Re: [HACKERS] regression bigtest needs very long time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] regression bigtest needs very long time
Дата
Msg-id 22089.930753231@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] regression bigtest needs very long time  (Michael Robinson <robinson@netrinsics.com>)
Ответы Re: [HACKERS] regression bigtest needs very long time
Список pgsql-hackers
Michael Robinson <robinson@netrinsics.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Richards
Дата:
Сообщение: Re: [HACKERS] Getting number of tuples affected
Следующее
От: Vince Vielhaber
Дата:
Сообщение: Re: [HACKERS] Getting number of tuples affected