On 17/1/26 22:10, Tom Lane wrote:
Andrei Lepikhov <[email protected]> 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


Reply via email to