On Thu, 14 Nov 2002, pginfo wrote:
> Hi,
>
> Why is the sort part of my query getting so much time?
>
> I run a relative complex query and it gets about 50 sec.
> For sorting I need another 50 sec!
>
> Can I increase the sort memory for better performance?
> How meny memory is needet for the sort in pg.
> The same data readet in java and sorted cost 10 sec !
Increasing sort_mem can help, but often the problem is that your query
isn't optimal. If you'd like to post the explain analyze output of your
query, someone might have a hint on how to increase the efficiency of the
query.