News for hackers. Stuff that matters.
Re:Why PostgreSQL doesn't have query hints by wiredfool on Friday February 04, 2011 @04:56PM (#2181431)
I've been there, and have the scars from it.

In several cases, I have order by (id{primary key}+0) desc just to bust up the very strong bias to just backwards scan on the primary key till it fills the limit window. That's perfectly fine if you're looking at the end of a time series, but if you're actually looking 200k records back, even if stuff is cached in memory, that's a hell of a hit.

The case that first triggered that one was when the query planner went from a constant time lookup to that index scan, and took the time to do a large update from 10s of seconds to 12 hours.

There are no comments on this comment yet.