Received: from megazone.bigpanda.com ([63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB5ISsm88885 for ; Wed, 5 Dec 2001 13:28:54 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 83C17D5E9; Wed, 5 Dec 2001 10:28:54 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 7969E5BEA; Wed, 5 Dec 2001 10:28:54 -0800 (PST) Date: Wed, 5 Dec 2001 10:28:54 -0800 (PST) From: Stephan Szabo To: =?iso-8859-1?Q?DI_Hasen=F6hrl?= Cc: Subject: Re: make query faster?? In-Reply-To: <003601c17d6a$398f9100$01011eac@irina> Message-ID: <20011205101538.S16316-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by postgresql.org id fB5IaAn89242 X-Archive-Number: 200112/53 X-Sequence-Number: 5876 On Wed, 5 Dec 2001, [iso-8859-1] DI Hasenöhrl wrote: > Thank you for your response, but I'm not quite clear. > > Is *sort_mem* the same as postgres' starting option -S *Sortsize*, > which is by default 512Kb > At this time I increased sortsize to 1024Kb, but the costs from > explain are the same as before and I can't see, that the query is > faster IIRC the explain costs may not change. If your table really only has 4000 rows, I don't see why it would need to drop off to disk, but while the query is running, you can see if pg_sorttemp* files are being created under your data directory (which would show that it is going out to disk and that you may need to raise -S again). Otherwise, is the data involved something you can share? It might help for us to be able to try it elsewhere to see how it performs. > Please, can you explain, what *cost=341.63..341.63* means It's an estimate of cost. I believe the first is startup cost and the last total cost. You probably want to read the performance tips section of the user's guide.