SQL - Indexing for performance on uniquness check...

Поиск
Список
Период
Сортировка
От Loftis, Charles E
Тема SQL - Indexing for performance on uniquness check...
Дата
Msg-id 25DC89BACF65D549BA045B806348C65E045DC783@ushem201.exse01.exch.eds.com
обсуждение исходный текст
Ответы Re: SQL - Indexing for performance on uniquness check...  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-novice
When trying to find duplicates on an table how I need to know how index the
table to optimize performance.
Should there be an index for each attribute (A1, A2, ..., An) in the GROUP
BY or should there be one multi-attribute index on all the grouping
attributes.

Assume the table has more attributes than those attributes being GROUPed on.
Also, assume all attributes are of type varchar.

Sample query to return non-uniqueness
   SELECT A1, A2, A3, ..., An
   FROM Table
   GROUP BY A1, A2, A3, ..., An
   HAVING Count(*)>1

В списке pgsql-novice по дате отправления:

Предыдущее
От: Steve Tucknott
Дата:
Сообщение: FUNCTION error and UNICODE
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: SQL - Indexing for performance on uniquness check...