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

Re: [HACKERS] regression bigtest needs very long time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Robinson <robinson(at)netrinsics(dot)com>
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] regression bigtest needs very long time
Date: 1999-06-30 14:33:51
Message-ID: 22089.930753231@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Michael Robinson <robinson(at)netrinsics(dot)com> writes:
> The question, though, becomes what percentage of operations on a 
> NUMERIC field are arithmetic, and what percentage are storage/retrieval.

Good point.

> For databases that simply store/retrieve data, your "optimization" will have
> the effect of significantly increasing format conversion overhead.  With a
> 512-byte table, four packed-decimal digits can be converted in two
> primitive operations, but base-10000 will require three divisions, 
> three subtractions, four additions, plus miscellaneous data shuffling.

That is something to worry about, but I think the present implementation
unpacks the storage format into calculation format before converting
to text.  Getting rid of the unpack step by making storage and calc
formats the same would probably buy enough speed to pay for the extra
conversion arithmetic.

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: Vince VielhaberDate: 1999-06-30 14:41:30
Subject: Re: [HACKERS] Getting number of tuples affected
Previous:From: Michael RichardsDate: 1999-06-30 14:28:43
Subject: Re: [HACKERS] Getting number of tuples affected

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