Re: using greater than or less than vs equals in where condition

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: using greater than or less than vs equals in where condition
Дата
Msg-id 19398.1115953945@sss.pgh.pa.us
обсуждение исходный текст
Ответ на using greater than or less than vs equals in where condition  (Prasanth <dbadmin@nqadmin.com>)
Ответы Re: using greater than or less than vs equals in where condition  (Prasanth <dbadmin@nqadmin.com>)
Список pgsql-admin
Prasanth <dbadmin@nqadmin.com> writes:
> PG Version: 7.4.7

> explain analyze select * from data where type_code >'2' AND type_code<'4';
> [ is slow ]
> explain analyze select * from data where type_code = '3';
> [ isn't ]

Are there a whole lot of rows with type_code = 2?  If so, this is
fixed in 8.0.

2003-12-20 20:23  tgl

    * src/: backend/access/nbtree/nbtinsert.c,
    backend/access/nbtree/nbtpage.c, backend/access/nbtree/nbtsearch.c,
    include/access/nbtree.h: Improve btree's
    initial-positioning-strategy code so that we never need to step
    more than one entry after descending the search tree to arrive at
    the correct place to start the scan.  This can improve the behavior
    substantially when there are many entries equal to the chosen
    boundary value.  Per suggestion from Dmitry Tkach, 14-Jul-03.

            regards, tom lane

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

Предыдущее
От: Prasanth
Дата:
Сообщение: using greater than or less than vs equals in where condition
Следующее
От: "Vishal Kashyap @ [SaiHertz]"
Дата:
Сообщение: Re: Compile Error for postgresql-8.0.3