Re: Very inefficient query plan with disjunction in WHERE clause

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





2009/6/1 Koen Martens <pgsql@xxxxxxxx>

Now, when I split up the OR in two distinct queries, everything is nice and fast. Both queries run in sub-second time.

Hi.

PostgreSQL simply do not like ORs (can't use indexes in this case), so UNION/UNION ALL is your friend.

Best regards, Vitalii Tymchyshyn

 


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux