Re: SELECT * FROM t where p or q; - Mailing list pgsql-sql

From caldodge@fpcc.net (Calvin Dodge)
Subject Re: SELECT * FROM t where p or q;
Date
Msg-id ca6275f0.0111201615.630ef37b@posting.google.com
Whole thread Raw
In response to SELECT * FROM t where p or q;  (frbn@efbs-seafrigo.fr)
List pgsql-sql
frbn@efbs-seafrigo.fr wrote in message news:<3BF51764.8BEAC873@efbs-seafrigo.fr>...

> SELECT * FROM tab WHERE num = x OR num = y;
> 
> time: more than 10 mn !!!
> 
> num is an integer.

Parsers and optimizers don't always see what's _obvious_ to us.

Have you tried:

SELECT * from tab where num in (x,y);


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: SELECT * FROM t where p or q;
Next
From: caldodge@fpcc.net (Calvin Dodge)
Date:
Subject: Re: Optimization with dates