Thanks a lot for reply. Finally I have used UNION, but thanks for your help.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Query-improvement-tp4362578p4378160.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.