Search Postgresql Archives

Re: [RFE] auto ORDER BY for SELECT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Douglas Eric <sekkuar@xxxxxxxxxxx> 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°

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux