Message 27451

Author
ced
Date
2016-07-29.12:35:06
Message id
27451

Content

On 2016-07-29 11:41, Jean CAVALLO wrote:
> They may be useful in some cases, I just wanted to point out that in the
> particular case you gave they do not.
> 
> See http://dba.stackexchange.com/questions/27481/is-a-composite-index-also-good-for-queries-on-the-first-field
> and http://dba.stackexchange.com/questions/6115/working-of-indexes-in-postgresql
> 
> The scheduler will use the composite index for the first column and it
> will be as efficient as having an extra index only on this column.
> This allows to create less indexes and save some space :)

Not necessary, such composite index could be bigger and so more
expensive to load. So as my previous link shows, there are legitimate
use case to have "duplicate" indexes so a warning will be annoying.

> Regarding the reverse, I agree it should not be a rule, but IMHO in
> 90-95% of the case it should be set. Even on small tables, where the
> cost of adding the index is minimal.

No, index on small table is just a waste of resources.
History
Date User Action Args
2016-07-29 12:35:07cedsetrecipients: + albertca, pokoli, jcavallo
2016-07-29 12:35:06cedlinkissue5757 messages
2016-07-29 12:35:06cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)