Re: not using index for select min(...)

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: not using index for select min(...)
Дата
Msg-id 20030201010229.GA14084@wolff.to
обсуждение исходный текст
Ответ на not using index for select min(...)  (Don Bowman <don@sandvine.com>)
Список pgsql-performance
On Fri, Jan 31, 2003 at 16:12:38 -0500,
  Don Bowman <don@sandvine.com> wrote:
> I have a table which is very large (~65K rows). I have
> a column in it which is indexed, and I wish to use for
> a join. I'm finding that I'm using a sequential scan
> for this when selecting a MIN.
>
> I've boiled this down to something like this:
>
> => create table X( value int primary key );
> => explain select min(value) from x;

Use the following instead:
select value from x order by value limit 1;

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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: not using index for select min(...)
Следующее
От: Sean Chittenden
Дата:
Сообщение: Re: not using index for select min(...)