From: Carlos Benkendorf <carlosbenkendorf@yahoo.com.br>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-performance@postgresql.org
Subject: Re: ORDER BY costs
Date: Thu, 22 Dec 2005 14:06:20 +0000 (GMT)
Message-ID: <20051222140620.81529.qmail@web35501.mail.mud.yahoo.com> (raw)
In-Reply-To: <15455.1135193975@sss.pgh.pa.us>
I´m not sure but I think the extra runtime of the select statement that has the ORDER BY clause is because the planner decided to sort the result set.
Is the sort really necessary? Why not only scanning the primary key index pages and retrieving the rows like the select without the order by clause?
Aren´t not the rows retrieved from the index in a odered form?
Thanks in advance!
Benkendorf
---------------------------------
Yahoo! doce lar. Faça do Yahoo! sua homepage.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: carlosbenkendorf@yahoo.com.br, tgl@sss.pgh.pa.us
Subject: Re: ORDER BY costs
In-Reply-To: <20051222140620.81529.qmail@web35501.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox