Skip site navigation (1) Skip section navigation (2)

Re: Sort time

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>,"scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>,"pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Sort time
Date: 2002-11-15 18:48:23
Message-ID: 1037386103.14810.82.camel@jester (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Fri, 2002-11-15 at 12:33, Josh Berkus wrote:
> Pginfo,
> > Yes I have indexes on all this fields.
> > Also I vacuumed and that is the result after it.
> > Actualy I do not see what bad in query execution. The problem is in
> > sort
> > time!
> Hmmm... I don't understand.  The way I read the EXPLAIN, the sort is
> only taking a few seconds.   Am I missing something, here?  

The estimated cost had the sort at a few seconds, but the actual times
show it is taking 50% of the total query time.

The big problem is he's sorting by a varchar() which isn't overly quick
no matter what locale.  Integers are nice and quick (s.OP is an int,
which shows this).

If IDS_NUM is a number, he could try casting it to an int8, but without
data examples I couldn't say.

Rod Taylor <rbt(at)rbt(dot)ca>

In response to


pgsql-performance by date

Next:From: Josh BerkusDate: 2002-11-15 18:55:11
Subject: Re: [GENERAL] Upgrade to dual processor machine?
Previous:From: Josh BerkusDate: 2002-11-15 17:33:47
Subject: Re: Sort time

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group