Re: Query in 9.0.2 not using index in 9.0.0 works fine

Поиск
Список
Период
Сортировка
От Samuel Gendler
Тема Re: Query in 9.0.2 not using index in 9.0.0 works fine
Дата
Msg-id CAEV0TzAM44Tr-hs0FOzyayBsmoJHVUMXsjG0A-UqALxjug1o5g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query in 9.0.2 not using index in 9.0.0 works fine  ("Matthias Howell" <Matthias.Howell@voxco.com>)
Список pgsql-performance


On Wed, Jul 6, 2011 at 5:50 AM, Matthias Howell <Matthias.Howell@voxco.com> wrote:

 

However, in the end, it was user brain damage.

 

It does use the doc id index for the subquery, but for some reason, the primary key on sentences - the sentenceid - was not set.  So in fact, there is no index.

 

Machines vindicated once again.


For the record, if you follow the instructions for submitting slow query questions, we'd likely have spotted it very quickly if you hadn't spotted it yourself while doing the cut and paste.  The instructions ask for table definitions, so you'd likely have noticed the missing index when you copied those into your email.  The link (http://wiki.postgresql.org/wiki/SlowQueryQuestions ) is right there on the mailing list page at postgresql.org.  It's always a toss-up whether to attempt to answer a question like yours or just respond with a link to that page when the relevant info is missing ;-)

--sam

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: 100% CPU Utilization when we run queries.
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: 100% CPU Utilization when we run queries.