Re: Slow queries on simple index - Mailing list pgsql-performance

From Andrei Lepikhov
Subject Re: Slow queries on simple index
Date
Msg-id 8f2a034a-6e32-43f4-92e9-276b15dc0a5f@gmail.com
Whole thread Raw
In response to Re: Slow queries on simple index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On 17/1/26 22:10, Tom Lane wrote:
> Andrei Lepikhov <lepihov@gmail.com> writes:
>> Hmm, where is the evidence that your query uses theindex? Maybe the
>> generic plan accidentally forces SeqScan?
> 
> Oh ... you're on to something.  I think we all assumed that this was
> an intermittent problem, but if it happens every time, I bet it's a
> datatype mismatch issue.
Yes, index mismatches due to type differences are frequently a pain for 
me in the world of auto-generated queries. Why not spend a few 
additional cycles to check whether a potential cast is possible?
I didn't track what happened in this example, but it would be beneficial 
to let an extension implement such functionality. The prosupport 
machinery attached to an index looks like a promising approach.

-- 
regards, Andrei Lepikhov,
pgEdge



pgsql-performance by date:

Previous
From: "Lillian Berry"
Date:
Subject: [Solved] Slow queries on simple index
Next
From: Andrei Lepikhov
Date:
Subject: Re: small database huge planning time