Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: single index on more than two coulumns a bad thing? - Mailing list pgsql-performance

From Tom Lane
Subject Re: single index on more than two coulumns a bad thing?
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: single index on more than two coulumns a bad thing?  (Josh Berkus <[email protected]>)
List pgsql-performance
Josh Berkus <[email protected]> writes:
>> Is it always bad to create index xx on yy (field1, field2, field3);

> I'm afraid that you've been given some misleading advice.

I'd say it's a matter of getting your optimizations straight.

If you have a query that can make use of that index, and the query is
executed often enough to make it worth maintaining the index during
table updates, then by all means make the index.

The standard advice is meant to warn you against creating a zillion
indexes without any thought to what you'll be paying in update costs.
Indexes with more than a couple of columns are usually of only narrow
applicability, and so you have to be sure that they'll really pay for
themselves...

            regards, tom lane

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: single index on more than two coulumns a bad thing?
Next
From: Greg Stark
Date:
Subject: Re: Index Performance Help