Issue with query scanning through all data even with indexes

Поиск
Список
Период
Сортировка
От Kai Sellgren
Тема Issue with query scanning through all data even with indexes
Дата
Msg-id CANyR-3cyvy95XufRNd9kq4yfuKOskaA0v-8AT7GDBUvRRDKXjQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Issue with query scanning through all data even with indexes  (Igor Neyman <ineyman@perceptron.com>)
Список pgsql-performance
Hi,

I have a query that has each field used in conditions + sort indexed, but it scans through all data.

The query in question looks like:


I have each of those condition fields indexed:

NewsArticle.groupId
NewsArticle.sharedToCommunityIds
NewsArticle.sourceFilterIds
CommunityGroupLink.communityId
CommunityGroupLink.groupId
SourceFilter.groupId
SourceFilter.communityId

This is the data output for explain http://d.pr/i/VGT3

And in visual http://d.pr/i/mqiN

Line 7 says rows=99173 which makes it real slow (it can take up to a minute to run).

Do you have any ideas? All of them are appreciated!

Cheers,

--
Yours sincerely,
Kai Sellgren

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

Предыдущее
От: Josh Kupershmidt
Дата:
Сообщение: Re: COMMIT stuck for days after bulk delete
Следующее
От: ambilalmca
Дата:
Сообщение: PostgreSQL query for cache performance counters?