[HACKERS] Bad query optimisation

2002-11-30 Thread Greg Stark
This is weird, it seems like min and max aren't being optimised symmetrically. It seems like both of these should result in similar plans and run equally fast. Instead the first is actually really slow and the second is perfectly quick. foo=# explain select max(postalcode) from postalcodes

Re: [HACKERS] Bad query optimisation

2002-11-30 Thread Christopher Kings-Lynne
This is weird, it seems like min and max aren't being optimised symmetrically. It seems like both of these should result in similar plans and run equally fast. Instead the first is actually really slow and the second is perfectly quick. Without knowing anything about your data, if Postgres

Re: [HACKERS] Bad query optimisation

2002-11-30 Thread Greg Stark
Christopher Kings-Lynne [EMAIL PROTECTED] writes: This is weird, it seems like min and max aren't being optimised symmetrically. It seems like both of these should result in similar plans and run equally fast. Instead the first is actually really slow and the second is perfectly quick.