Re: SELECT * FROM t where p or q;

From: caldodge(at)fpcc(dot)net (Calvin Dodge)
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: SELECT * FROM t where p or q;
Date: 2001-11-21 00:15:03
Message-ID: ca6275f0.0111201615.630ef37b@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

frbn(at)efbs-seafrigo(dot)fr wrote in message news:<3BF51764(dot)8BEAC873(at)efbs-seafrigo(dot)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);

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Merrill Oveson 2001-11-21 00:15:57 bug, I think
Previous Message Fábio Santana 2001-11-20 23:56:55 RULES