Index usage for BYTEA column in OR/IN clause

Поиск
Список
Период
Сортировка
От David Garamond
Тема Index usage for BYTEA column in OR/IN clause
Дата
Msg-id 4065953D.2050708@zara.6.isreserved.com
обсуждение исходный текст
Ответы Re: Index usage for BYTEA column in OR/IN clause
Re: Index usage for BYTEA column in OR/IN clause
Список pgsql-general
Is it true that the planner currently doesn't utilize index for BYTEA
column in OR or IN clause?

  -- b is an indexed BYTEA column

  explain select * from t where b='foo';                    -- index scan
  explain select * from t where b like 'f%';                -- index

  explain select * from t where b='foo' or b='bar';         -- seq scan
  explain select * from t where b='foo' or b like 'b%';     -- seq
  explain select * from t where b like 'f%' or b like 'b%'; -- seq
  explain select * from t where b in ('foo','bar');         -- seq

Currently I'm setting enable_seqscan to off for these...

--
dave

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Welty
Дата:
Сообщение: Re: Physical Database Configuration
Следующее
От: weiping he
Дата:
Сообщение: Re: Native Win32 port - PLEASE!