| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: LIMIT Question |
| Дата | |
| Msg-id | 20080229102541.GA28668@svana.org обсуждение |
| Ответ на | Re: LIMIT Question ("Gurjeet Singh" <singh.gurjeet@gmail.com>) |
| Ответы |
Re: LIMIT Question
|
| Список | pgsql-general |
On Fri, Feb 29, 2008 at 02:53:05PM +0530, Gurjeet Singh wrote: > In my opinion (without looking at the code), if you have a grouping-function > or ORDER BY or GROUP BY clause, then yes, the whole query has to be executed > to show the first row of the result-set. But if the query doesn't have any > of these clauses, then the DB has the ability to send back the first row > from the result as soon as it processes it (i.e after WHERE clause > processing), and stop the query execution there. Except if you have an index on the column you're ordering by. Then the server can really return the first row quickly. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution inevitable. > -- John F Kennedy
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера