On Thu, Sep 22, 2016 at 6:37 AM, Madusudanan.B.N <b.n.madusuda...@gmail.com> wrote:
> > However, this results in an awful slow plan (requiring to scan the > complete big_table which obviously isn't optimal) > > You mean to say there is a sequential scan ? An explain would be helpful. > Are there indexes on the provided where clauses. > > Postgres can do a Bitmap heap scan to combine indexes, there is no need to > fire two separate queries. > It can't combine bitmap scans that come from different tables. But he can just combine the two queries into one, with a UNION. Cheers, Jeff