Re: encourging bitmap AND

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: encourging bitmap AND
Дата
Msg-id AANLkTimvWF7BZo8Ko+wExE+pCfeRqvnz-Qp--2w=7h3C@mail.gmail.com
обсуждение исходный текст
Ответ на Re: encourging bitmap AND  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: encourging bitmap AND
Список pgsql-performance
On Thu, Dec 23, 2010 at 22:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ben <midfield@gmail.com> writes:
>> i have a schema similar to the following
>
>> create index foo_s_idx on foo using btree (s);
>> create index foo_e_idx on foo using btree (e);
>
>> i want to do queries like
>
>> select * from foo where 150 between s and e;
>
> That index structure is really entirely unsuited to what you want to do,
> so it's not surprising that the planner isn't impressed with the idea of
> a bitmap AND.

Why is it unsuited for this query? It expands to (150 < s AND 150 > e)
 which should work nicely with bitmap AND as far as I can tell.

Regards,
Marti

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

Предыдущее
От: Mladen Gogala
Дата:
Сообщение: Re: concurrent IO in postgres?
Следующее
От: Desmond Coertzen
Дата:
Сообщение: Index on function that returns type with sub fields