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

Re: Sort time

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Rod Taylor <rbt(at)rbt(dot)ca>
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 19:27:29
Message-ID: 200211151127.29405.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
Rod,

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

D'oh!   I was, of course, subtracting the estimated from the actual time.  
Oops.

> 
> 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.

Hmmm ... how big *is* that varchar field?  8 characters gives us about 6mb for 
the column.  Of course, if it's a 128-char global unque id, that;s a bit 
larger.

-- 
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
                                        Josh Berkus
   Complete information technology 	josh(at)agliodbs(dot)com
    and data management solutions 	(415) 565-7293
   for law firms, small businesses 	 fax 621-2533
    and non-profit organizations. 	San Francisco


In response to

Responses

pgsql-performance by date

Next:From: Rod TaylorDate: 2002-11-15 19:28:39
Subject: Re: Sort time
Previous:From: Josh BerkusDate: 2002-11-15 18:55:11
Subject: Re: [GENERAL] Upgrade to dual processor machine?

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