Re: [RFE] auto ORDER BY for SELECT

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: [RFE] auto ORDER BY for SELECT
Дата
Msg-id 20120123162619.GA3736@tux
обсуждение исходный текст
Ответ на [RFE] auto ORDER BY for SELECT  (Douglas Eric <sekkuar@hotmail.com>)
Список pgsql-general
Douglas Eric <sekkuar@hotmail.com> wrote:

> I'm not sure if this is the right list to discuss this, but, I have a
> suggestion:
>
> ORDER BY clause, as defined in the SELECT documentation says:
>
> "If ORDER BY is not given, the rows are returned in whatever order the system
> finds fastest to produce"
>
> This order is usually not wanted, as it is not predictable. I believe many
> people would expect  the order of rows
> returned in this case, to be ordered as the primary key of the table, or the
> same order the rows were inserted.
>
> I suggest to change this behavior. If one makes a SELECT statement without any
> ORDER BY, it would be
> clever to automatically sort by the first primary key found in the query, if
> any.

No.

Since 8.3 (IIRC) we have a feature called 'concurrent seq. scan', see:
http://j-davis.com/postgresql/83v82_scans.html

Your suggestion can't work in this way. That's only one problem, there
are more.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [RFE] auto ORDER BY for SELECT
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: [RFE] auto ORDER BY for SELECT