Re: Postgres not using indexes

Поиск
Список
Период
Сортировка
Искать
От
Greg Stark
Тема
Re: Postgres not using indexes
Дата
Msg-id
AANLkTikniFOL=SN1-xdWSJ+TrOmiN4xGxPqZSXd3yyVP@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes "Nathan M. Davalos" <n.davalos@sharedmarketing.com>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Greg Stark <gsstark@mit.edu>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Greg Stark <gsstark@mit.edu>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
Re: Postgres not using indexes Harry Rossignol <harrywr2@comcast.net>
Re: Postgres not using indexes "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Postgres not using indexes Pavel Stehule <pavel.stehule@gmail.com>
Re: Postgres not using indexes Lawrence Cohan <LCohan@web.com>
On Wed, Mar 30, 2011 at 7:32 PM, Lawrence Cohan  wrote:
> Please see updated attachment that includes the tables involved in the si=
mple query below and all their indexes. We believe that the performance iss=
ue is due to the query not using any index but doing seq scans instead and =
this is very little related to the knowledge from the link you posted below=
. As you can see we picked a simple query with INNER JOIN between two index=
ed tables where postgres 8.3 and 9.0 decides to not use existing indexes fo=
r whatever reason.


Have you tried using enable_seqscan =3D off and looked at the explain outpu=
t then?

I think you'll find Postgres is choosing not to use the indexes
because they're just not helpful. If you disable seqscan it should use
the indexes but I expect it will be slower. The current plan is doing
a single pass through both tables using entirely sequential i/o.
That's about as fast as you could hope for it to be as your query does
require reading all the data.


--=20
greg
В списке pgsql-bugs по дате отправления
От: Kris Jurka
Дата:
От: Kris Jurka
Дата:
FAQ