Re: Table Design question for gurus (without going to "NoSQL")...

Поиск
Список
Период
Сортировка
От Phoenix Kiula
Тема Re: Table Design question for gurus (without going to "NoSQL")...
Дата
Msg-id CAFWfU=so0Ugjf-2g8xBtAOmiTyvdTfjC-F1d+SGv3Pja+ub4Eg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Table Design question for gurus (without going to "NoSQL")...  ("Tomas Vondra" <tv@fuzzy.cz>)
Список pgsql-general
On Mon, Nov 21, 2011 at 6:14 PM, Tomas Vondra <tv@fuzzy.cz> wrote:
.....
>>
>> An index on (a, b) can be used for queries involving only a but not for
>> those involving only b.
>
> That is not true since 8.2 - a multi-column index may be used even for
> queries without conditions on leading columns. It won't be as effective as
> with conditions on leading columns, because the whole index must be
> scanned, but it's usually much cheaper than keeping two indexes (memory
> requirements, overhead when inserting data etc.)
>
> Check this:
> http://www.postgresql.org/docs/8.2/interactive/indexes-multicolumn.html




Thanks Tomas. VERY useful information.

I've decided to go with a unique multicolumn index for now.

Will ask the experts here if I see some issues..

Thanks!

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

Предыдущее
От: Phoenix Kiula
Дата:
Сообщение: Re: Installed. Now what?
Следующее
От: Yeb Havinga
Дата:
Сообщение: Re: Recommendations for SSDs in production?