Re: ORDER BY costs - Mailing list pgsql-performance

From Carlos Benkendorf
Subject Re: ORDER BY costs
Date
Msg-id 20051222140620.81529.qmail@web35501.mail.mud.yahoo.com
Whole thread Raw
In response to Re: ORDER BY costs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
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.

pgsql-performance by date:

Previous
From: Markus Schaber
Date:
Subject: Re: MySQL is faster than PgSQL but a large margin in
Next
From: Dave Cramer
Date:
Subject: Re: effizient query with jdbc