Re: indexes across joins not used for count

Поиск
Список
Период
Сортировка
Искать
От
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 Jeff Davis <pgsql@j-davis.com>
Re: indexes across joins not used for count Jeremy Wells <jemmyw@gmail.com>
Re: indexes across joins not used for count Jeff Davis <pgsql@j-davis.com>
Re: indexes across joins not used for count Jeremy Wells <jemmyw@gmail.com>
Re: indexes across joins not used for count Tom Lane <tgl@sss.pgh.pa.us>
Re: indexes across joins not used for count Jeremy Wells <jemmyw@gmail.com>
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 по дате отправления
От: Jeff Davis
Дата:
От: Jeremy Wells
Дата:
FAQ