Re: ORDER BY - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: ORDER BY
Date
Msg-id 200507271726.26317.josh@agliodbs.com
Whole thread Raw
In response to Re: ORDER BY  ("Marc G. Fournier" <scrappy@postgresql.org>)
List pgsql-hackers
Marc,

> Basically, from how everyone has explained it, the ORDER BY will be done
> after all the JOINs are done, and the "product of the joins" are
> complete ... for it to be performed on a field not in the SELECT <field>
> clause, then those fields have to be "loaded into memory", *then*
> ORDERed, and then the query would return teh result set out of those
> "mega table" ...

Pretty much, yes.   We have to load the referenced rows anyway because 
that's the only way to locate visibility information, which is critical 
for an inner join.   

However, this discussion doesn't really belong on -hackers.  Why don't you 
bring it over to IRC?


-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Autovacuum to-do list
Next
From: David Fetter
Date:
Subject: Re: Some new list.c primitives