Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 21, 2011 at 6:14 PM, Tomas Vondra <tv@xxxxxxxx> 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!

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux