Re: index theory

Поиск
Список
Период
Сортировка
Искать
От
Rod Taylor
Тема
Re: index theory
Дата
Msg-id
1034774738.42802.2.camel@jester
Ответ на
index theory (Karel Zak)
Список
Дерево обсуждения
index theory Karel Zak <zakkr@zf.jcu.cz>
Re: index theory Rod Taylor <rbt@rbt.ca>
Re: index theory Karel Zak <zakkr@zf.jcu.cz>
Re: index theory Hannu Krosing <hannu@tm.ee>
On Wed, 2002-10-16 at 09:19, Karel Zak wrote:
> 
>  Hi,
> 
>  I have SQL query:
> 
>  SELECT * FROM ii WHERE i1='a' AND i2='b';
> 
>  There're indexes on i1 and i2. I know best solution is use one
>  index on both (i1, i2).
> 
>  The EXPLAIN command show that optimalizer wants to use one index:
> 
> test=# explain SELECT * FROM ii WHERE i1='a' AND i1='b';
>                                    QUERY PLAN                                    
> ---------------------------------------------------------------------------------
>  Index Scan using i1 on ii  (cost=0.00..4.83 rows=1 width=24)
>    Index Cond: ((i1 = 'a'::character varying) AND (i1 = 'b'::character varying))

I think you typo'd.  i1='a' AND i1='b' turns into 'a' = 'b' which
certainly isn't true in any alphabets I know of.

--  Rod Taylor


В списке pgsql-hackers по дате отправления
От: Karel Zak
Дата:
Сообщение: index theory
От: Karel Zak
Дата:
Сообщение: Re: index theory
FAQ