| От | Jeff Davis |
|---|---|
| Тема | Re: indexes across joins not used for count |
| Дата | |
| Msg-id | 1350757282.14401.11.camel@jdavis обсуждение исходный текст |
| Ответ на | indexes across joins not used for count (Jeremy Wells <jemmyw@gmail.com>) |
| Ответы |
Re: indexes across joins not used for count
|
| Список | pgsql-novice |
On Tue, 2012-10-16 at 16:08 +1300, Jeremy Wells wrote:
> I'm running a query to do a count with two joins in it. I've added
> indexes to the tables for the join columns, but the explain of the query
> doesn't seem to be using the indexes:
Can you post the output of EXPLAIN ANALYZE? Did you do an ANALYZE of the
tables already?
You can often force an index scan by doing:
SET enable_seqscan=false;
So also try setting that, and run EXPLAIN ANALYZE again, and see if it
uses the indexes, and if so, if it's faster.
Regards,
Jeff Davis
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера