Re: single index on more than two coulumns a bad thing?
От
Tom Lane
Тема
Re: single index on more than two coulumns a bad thing?
Дата
Msg-id
18754.1080880598@sss.pgh.pa.us
Ответ на
Re: single index on more than two coulumns a bad thing? (Josh Berkus)
Список
Дерево обсуждения
Re: single index on more than two coulumns a bad thing? "Aaron Werman" <awerman2@hotmail.com>
Josh Berkus 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 по дате отправления