On 10/18/06, Jan Harders <jan@xxxxxxxxxxxxx> wrote:
and, as guessed, takes forever. tried to ANALYZE the table but no change. Anyone got any ideas? I just don't understand why it's sorting the values while the index should already be sorted... Oh, btw, I'm on 7.4 (sarge stable version). Could this behaviour change if I just upgrade to 8.1?
yes :-) if you're feeling frisky, bite the bullet and give 8.2 a spin!
any input is appreciated - it's not a critical project but just a private one I'm using to get familiar with postgre.
8.1 is smarter with these types of queries and just faster generally. if that doesn't help, its down to tweaking statistics, etc...note that I rarely, if ever, resort to that type of optimization. merlin