Dmitry Koterov wrote: > I don't know exactly is it your case, but sometimes > > SET enable_sort = off; > > speeds up some queries by the factor of hundred. But in some cases this > command slows down operations, so I TEMPORARILY switch enable_sort on and > off for some queries. It affects the query plan greatly. As you may have noticed, there's no sort in my query plan ;) Seriously, I do not intend to use options like these in production queries. They're not meant to be used like that. It usually means you're trying to do something more complicated than necessary - I achieved improved results by cleaning up my design, removing hacks that appeared useful while we were still using PG 7.4. -- Alban Hertroys alban@xxxxxxxxxxxxxxxxx magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World //