Re: Very inefficient query plan with disjunction in WHERE clause - Mailing list pgsql-performance

From Віталій Тимчишин
Subject Re: Very inefficient query plan with disjunction in WHERE clause
Date
Msg-id 331e40660906010919v479c690gc41594db8150931a@mail.gmail.com
Whole thread Raw
In response to Very inefficient query plan with disjunction in WHERE clause  (Koen Martens <pgsql@metro.cx>)
List pgsql-performance


2009/6/1 Koen Martens <pgsql@metro.cx>

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

 

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using index for bitwise operations?
Next
From: Alan McKay
Date:
Subject: Re: Best way to load test a postgresql server