sam.saffron wrote
> I have this query:
>
> select * from topics
> order by case when id=1 then 0 else 1 end, bumped_at desc
> limit 30
>
> It works fine, bumps id 1 to the front of the sort fine but is
> terribly inefficient and scans
>
> OTH
>
> "select * from topics where id = 1" is super fas
I have this query:
select * from topics
order by case when id=1 then 0 else 1 end, bumped_at desc
limit 30
It works fine, bumps id 1 to the front of the sort fine but is
terribly inefficient and scans
OTH
"select * from topics where id = 1" is super fast
"select * from topics order by bumped_a