Re: LIMIT clause optimization

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: LIMIT clause optimization
Дата
Msg-id 20030107131658.GA6839@wolff.to
обсуждение исходный текст
Ответ на Re: LIMIT clause optimization  (Felipe Schnack <felipes@ritterdosreis.br>)
Ответы Re: LIMIT clause optimization  (<terry@ashtonwoodshomes.com>)
Список pgsql-general
On Tue, Jan 07, 2003 at 10:44:15 -0200,
  Felipe Schnack <felipes@ritterdosreis.br> wrote:
>   Why? I don't understand. If I create a query and want just the first
> row from it, wouldn't speed up things a lot just adding "LIMIT 1" in the
> end of the query?

That depends on the query. For some queries you will only see a small
speed up. It is also possible for limit to effect the optimization results
in a way that ends up slowing things down (though that should be rare)
because an inferior plan ends up being chosen.

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

Предыдущее
От: Alan Gutierrez
Дата:
Сообщение: Re: 7.3 Prepared statements
Следующее
От:
Дата:
Сообщение: Re: LIMIT clause optimization