Re: Sort time - Mailing list pgsql-performance

From pginfo
Subject Re: Sort time
Date
Msg-id 3DD5E784.BA4FF2D7@t1.unisoftbg.com
Whole thread Raw
In response to Re: Sort time  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Sort time  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-performance
Hi,

Tom Lane wrote:

> Josh Berkus <josh@agliodbs.com> writes:
> > Here's a question: is the total size of the column a good indicator of the
> > sort_mem required?   Or does the rowsize affect it somehow?
>
> It will include all the data that's supposed to be output by the sort...
> both the key column(s) and the others.
>

Hmm it is not clear for me.Let we have all data.
If I make sort by S.OP ( it is INT) it take < 6 sek for sort.
I think we move all this data anly the number of comparation is by INT. I think
the number of comparation
is ~ n * ln(n).
If we sort by S.IDS_xxx we have also n*ln(n) comparations but in
varchar(string).
I don't think that it can take 50 sek.

Is it not so?

regards,
ivan.

>                         regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




pgsql-performance by date:

Previous
From: pginfo
Date:
Subject: Re: Sort time
Next
From: Stephan Szabo
Date:
Subject: Re: Sort time