I have a very complex view zinfoexp and running the view as:
SELECT * FROM zinfoexp WHERE idmembre in (1,84)
take 2700 ms
So, I try another syntax:
SELECT * FROM zinfoexp WHERE idmembre = 1
SELECT * FROM zinfoexp WHERE idmembre = 84
and for me, two calls to my view takes a lot of time (may be x2) and it
takes 134 ms !
How is it possible that the optimizer cannot optimize the IN as UNION ?
I have a database postgresql 9.3 freshly vacuumed
CKR Solutions Open Source http://www.ckr-solutions.com