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 18754.1080880598@sss.pgh.pa.us
Whole thread Raw
In response to Re: single index on more than two coulumns a bad thing?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
Josh Berkus <josh@agliodbs.com> 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