> 2. I tried this first: [ select * from map where (x=1 and y=1) or (x=1 and
> y=2) or (x=1 and y=3) ] but that didn't use the index -- not on 3.5.6 anyway
AFAIK "OR" will always omit indexes, this is why I am trying to use "IN"
--
Alexander Batyrshin aka bash
bash = Biomechanica Artificial Sab
On Thu, May 22, 2008 at 2:02 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> IN only works on a single column. The closest you can get to this is
> something like
>
> SELECT map.*
> FROM map join (
> select 1 x, 1 y
> union all
> select 1 x, 2 y
> union all
> select 1 x, 3 y)
> IN only works on a single column. The closest you can get to this is
> something like
>
> SELECT map.*
> FROM map join (
> select 1 x, 1 y
> union all
> select 1 x, 2 y
> union all
> select 1 x, 3 y) t
> ON map.x = t.x AND map.y=t.y;
Thanks. I will use more than 3 keys, so I
On Thu, May 22, 2008 at 1:41 PM, Alexander Batyrshin <[EMAIL PROTECTED]>
wrote:
> Hello All,
> For example we have table like this:
>
> CREATE TABLE map (
> name text,
> x integer,
> y integer
> );
> CREATE INDEX map_xy ON map(x,y);
>
> How to query this table with "IN" keyword?
> Query like t
Alexander Batyrshin <[EMAIL PROTECTED]>
wrote:
> Hello All,
> For example we have table like this:
>
> CREATE TABLE map (
> name text,
> x integer,
> y integer
> );
> CREATE INDEX map_xy ON map(x,y);
>
> How to query this table with "IN" keyword?
> Query like this, doesn't work:
>
> SELECT * FRO
5 matches
Mail list logo