Re: Postgres not using indexes

Поиск
Список
Период
Сортировка
От Lawrence Cohan
Тема Re: Postgres not using indexes
Дата
Msg-id 965AA5440EAC094E9F722519E285ACEDAC5E66A55F@WWCEXCHANGE.web.web.com
обсуждение исходный текст
Ответ на Re: Postgres not using indexes  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: Postgres not using indexes  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Postgres not using indexes  (Greg Stark <gsstark@mit.edu>)
Список pgsql-bugs
Please see updated attachment that includes the tables involved in the simple query below and all their indexes. We
believethat the performance issue is due to the query not using any index but doing seq scans instead and this is very
littlerelated to the knowledge from the link you posted below. As you can see we picked a simple query with INNER JOIN
betweentwo indexed tables where postgres 8.3 and 9.0 decides to not use existing indexes for whatever reason. 

        select oi.id from order_items oi inner join clients_orders co on oi.order_id = co.id;

Lawrence Cohan.

-----Original Message-----
From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov]
Sent: March-30-11 1:33 PM
To: pgsql-bugs@postgresql.org; Lawrence Cohan
Subject: RE: [BUGS] Postgres not using indexes

Lawrence Cohan <LCohan@web.com> wrote:
> From: Kevin Grittner [mailto:Kevin.Grittner@wicourts.gov]

>> [configuration advice]

>> If, after reading the above-cited page and tuning your server you
>> still have performance problems, pick one query to work on first,
>> and follow the step outlined here:
>>
>> http://wiki.postgresql.org/wiki/SlowQueryQuestions

> We thank you for the links that have a lots of info and please
> note that we tuned our servers as recommended by Enterprise DB
> experts while they were in house for our hardware/software
> migrations and the setting you mentioned are in place already.

Then the next step would be to provide enough information on one of
the slow queries for people to be able to offer useful advice.  Your
other post showed the query and the EXPLAIN ANALYZE output, but the
other information listed in the above-cited page is useful when
trying to understand a problem.  I'm particularly curious about the
data types of the id columns and the specifics of the index
definitions.

-Kevin

Attention:
The information contained in this message and or attachments is intended only for the person or entity to which it is
addressedand may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other
useof, or taking of any action in reliance upon, this information by persons or entities other than the intended
recipientis prohibited. If you received this in error, please contact the sender and delete the material from any
systemand destroy any copies. 

Вложения

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

Предыдущее
От: Jon Nelson
Дата:
Сообщение: backend for database 'A' crashes/is killed -> corrupt index in database 'B'
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Postgres not using indexes