Re: Indexes and Views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Indexes and Views
Дата
Msg-id 11932.983032555@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Indexes and Views  (R D <mrk279@yahoo.com>)
Ответы Re: Indexes and Views
Список pgsql-admin
R D <mrk279@yahoo.com> writes:
> i'm storing col1 to col3 as integers to save storage
> space(infact they are fixed point).I have many tables
> ctrated using this template only the view devidor
> constants are different for each table. Here they are
> 1000.0 1000.0 and 100.0 but for every table they are
> different. I would like to be able to execute the
> queryes like this using the index:

This table design is sufficiently ugly and pointless that I feel no deep
remorse over the fact that you can't use an index that way ;-)

Why are you bothering with these divisors?  float4 is no larger than
int4 and will eliminate all of these pushups: just store the values
naturally.

If there really is some good reason to use scaled integers, you should
build yourself a scaled-integer datatype.

            regards, tom lane

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

Предыдущее
От: R D
Дата:
Сообщение: Indexes and Views
Следующее
От: R D
Дата:
Сообщение: Re: Indexes and Views