Re: [HACKERS] Solution for LIMIT cost estimation

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: [HACKERS] Solution for LIMIT cost estimation
Дата
Msg-id 3.0.1.32.20000214070519.0170d150@mail.pacifier.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Solution for LIMIT cost estimation  (Chris <chris@bitmead.com>)
Список pgsql-hackers
At 10:47 PM 2/14/00 +1100, Chris wrote:

>Only that it's non intuitive that ORDER BY should change the actual
>results of a series of LIMIT queries, not just the order. If there are
>100 records, and I do 10x LIMIT 10,offset queries one might expect to
>get all 100 records.

The only person who will expect that is the person who hasn't bothered
to learn the fundamental SQL property that rows returned by queries
come back in non-deterministic order.

This is a FUNDAMENTAL concept in SQL, one that is mentioned in every
SQL book I've seen.

The same person probably expects NULL = NULL to return true, too.

So what?

> And currently you do (barring something unusual
>like a vacuum at an inopportune moment that drastically changes
>statistics).

Or an insert by another back end, not at all uncommon in the
kind of web environment where this construct is frequently
used.

>I'm just playing devils advocate here. Changing this is probably not
>going to hurt me, I just think it could confuse a lot of people.

See above.



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


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

Предыдущее
От: Don Baccus
Дата:
Сообщение: Re: [HACKERS] Solution for LIMIT cost estimation
Следующее
От: Don Baccus
Дата:
Сообщение: Re: [HACKERS] Solution for LIMIT cost estimation