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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, Jul 6, 2011 at 5:50 AM, Matthias Howell <Matthias.Howell@xxxxxxxxx> 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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux