Josh Berkus wrote:

I did in that way just to not use postgresql specific feature.
I can give it a try and I let you know, however the question remain,
why the index usage is lost if used in that way ?

Because PostgreSQL is materializing the entire UNION data set in the subselect. What Postgres version are you using? I thought this was fixed in 7.4, but maybe not ...

Yes, I'm using with 7.4.x, so it was not fixed...

Gaetano Mendola

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to