Re: 10+hrs vs 15min because of just one index

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: 10+hrs vs 15min because of just one index
Дата
Msg-id 43EFA2D2.1050609@logix-tt.com
обсуждение исходный текст
Ответ на Re: 10+hrs vs 15min because of just one index  (Aaron Turner <synfinatic@gmail.com>)
Список pgsql-performance
Hi, Aaron,

Aaron Turner wrote:

> 4) Does decoding the data (currently base64) and storing the binary
> data improve the distribution of the index, thereby masking it more
> efficent?

Yes, but then you should not use varchar, but a bytea.

If your data is some numer internally, numeric or decimal may be even
better.

If most of your data is different in the first 8 bytes, it may also make
sense to duplicate them into a bigint, and create the bigint on them.
Then you can use AND in your query to test for the 8 bytes (uses index)
and the bytea. Ugly, but may work.

HTH,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

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

Предыдущее
От: andrew@pillette.com
Дата:
Сообщение: Re: SQL Function Performance
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: SQL Function Performance