Re: PostgreSQL not using index for statement with group by

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: PostgreSQL not using index for statement with group by
Дата
Msg-id 4A9FF6F1020000250002AA99@gw.wicourts.gov
обсуждение исходный текст
Ответ на PostgreSQL not using index for statement with group by  (Mark Starkman <mark.starkman@activant.com>)
Список pgsql-performance
Mark Starkman <mark.starkman@activant.com> wrote:

> I'm not sure how to get it to return in
> reasonable amount of time.

Some more information could help.

What version of PostgreSQL is this?

Please give an overview of the hardware and OS.

Please show your postgresql.conf file, excluding comments.

Please run your query with EXPLAIN ANALYZE in front, so we can see the
execution plan, with cost estimates compared to actual information.
If the the plan indicates a sequential scan, and you think an indexed
scan may be faster, you might be able to coerce it into the indexed
plan for diagnostic purposes by running this on the connection before
an EXPLAIN ANALYZE run:

set enable_seqscan = off;

You don't want to leave it off, or try to use that in production, but
it might be useful in figuring out what's going on.

That might be enough to diagnose the issue.

-Kevin

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

Предыдущее
От: Ivan Voras
Дата:
Сообщение: Re: Seeking performance advice and explanation for high I/O on 8.3
Следующее
От: "Scott Otis"
Дата:
Сообщение: Re: Seeking performance advice and explanation for high I/O on 8.3