Re: [GENERAL] SELECT DISTINCT triggers sorting operation

2010-02-07 Thread Gaëtan Allart
You were absolutely right Tom. Rising work_mem did the trick! Many thanks :-) What's the best value for work_mem ? Gaëtan Le 7 févr. 2010 à 07:38, Tom Lane a écrit : > =?iso-8859-1?Q?Ga=EBtan_Allart?= writes: >> I'm experiencing an interesting issue with PostgreSQL 8.4.2-r2. >> I was running

Re: [GENERAL] SELECT DISTINCT triggers sorting operation

2010-02-06 Thread Tom Lane
=?iso-8859-1?Q?Ga=EBtan_Allart?= writes: > I'm experiencing an interesting issue with PostgreSQL 8.4.2-r2. > I was running a pretty big database on another server (8.3) pretty fine. > When I moved it to this new server, behaviour changed. Did you ANALYZE the database after loading it? Are you su

Re: [GENERAL] SELECT DISTINCT triggers sorting operation

2010-02-06 Thread Scott Marlowe
On Sat, Feb 6, 2010 at 3:49 PM, Gaëtan Allart wrote: > Hi everybody, > > I'm experiencing an interesting issue with PostgreSQL 8.4.2-r2. > I was running a pretty big database on another server (8.3) pretty fine. > When I moved it to this new server, behaviour changed. What does explain analyze ru

[GENERAL] SELECT DISTINCT triggers sorting operation

2010-02-06 Thread Gaëtan Allart
Hi everybody, I'm experiencing an interesting issue with PostgreSQL 8.4.2-r2. I was running a pretty big database on another server (8.3) pretty fine. When I moved it to this new server, behaviour changed. On a complex SELECT DISTINCT query, pgsql now runs a "SORT" operation although I've never r