Re: [HACKERS] sorting big tables :( - Mailing list pgsql-hackers

From Andreas Zeugswetter
Subject Re: [HACKERS] sorting big tables :(
Date
Msg-id 01BD8591.E2DCDF80@zeugswettera.user.lan.at
Whole thread Raw
Responses Re: [HACKERS] sorting big tables :(
List pgsql-hackers
> I have an idea.  Can he run CLUSTER on the data?  If so, the sort will
> not use small batches, and the disk space during sort will be reduced.

I think a real winner would be to use an existing index. This is what others do
to eliminate a sort completely. Of course the optimizer has to choose what is cheaper
on a per query basis (index access or sort of result set).
result set small --> use sort
result set large --> use available index

Andreas



pgsql-hackers by date:

Previous
From: Andreas Zeugswetter
Date:
Subject: Re: [HACKERS] error messages not only English
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes