Re: Table partitioning for maximum speed?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Table partitioning for maximum speed?
Дата
Msg-id 20031010180132.GC4206@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Table partitioning for maximum speed?  (greg@turnstep.com)
Список pgsql-general
On Fri, Oct 10, 2003 at 04:30:20PM -0000, greg@turnstep.com wrote:

> One way to speed things up is to convert the entire checksum. Consider
> what a md5 checksum really is: a text string representing a hexadecimal
> number. Storing it as TEXT or CHAR is not as good as storing it as a
> number directly. Have your application convert it to a decimal number,
> and then store the checksum as type NUMERIC in the database.

A subsequent idea is that with NUMERIC or other variable length fields
you are wasting time, space and cache hits anyway.  It would be probably
faster to create a custom datatype, with fixed length for the exact size
of an MD5 sum.  With suitable input and output functions and all the
operators you need, you will likely gain some additional performance
boost.

IIRC, Manfred Koizar developed a fixed-width char datatype for Shridar
Daitankhar (sp?) maybe a year ago.  It is probably a good starting
point.  Look for it in the pgsql-performance archives.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Endurecerse, pero jamás perder la ternura" (E. Guevara)

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

Предыдущее
От: Network Administrator
Дата:
Сообщение: Re: Interfaces that support cursors
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Table partitioning for maximum speed?