Re: Query in 9.0.2 not using index in 9.0.0 works fine - Mailing list pgsql-performance

From Samuel Gendler
Subject Re: Query in 9.0.2 not using index in 9.0.0 works fine
Date
Msg-id CAEV0TzAM44Tr-hs0FOzyayBsmoJHVUMXsjG0A-UqALxjug1o5g@mail.gmail.com
Whole thread Raw
In response to Re: Query in 9.0.2 not using index in 9.0.0 works fine  ("Matthias Howell" <Matthias.Howell@voxco.com>)
List 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 by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: 100% CPU Utilization when we run queries.
Next
From: Scott Marlowe
Date:
Subject: Re: 100% CPU Utilization when we run queries.