Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19330 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2012-01-24 19:30 +1100 |
| Last post | 2012-01-24 19:30 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [GENERAL] [RFE] auto ORDER BY for SELECT Chris Angelico <rosuav@gmail.com> - 2012-01-24 19:30 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2012-01-24 19:30 +1100 |
| Subject | Re: [GENERAL] [RFE] auto ORDER BY for SELECT |
| Message-ID | <mailman.5019.1327393819.27778.python-list@python.org> |
Whoooooops. Wrong list. *sigh* At least there's some variety - it's not Savoynet this time. Disregard the mad guy in the corner, he's not saying anything useful anyway... ChrisA On Tue, Jan 24, 2012 at 7:29 PM, Chris Angelico <rosuav@gmail.com> wrote: > On Mon, Jan 23, 2012 at 11:17 PM, Douglas Eric <sekkuar@hotmail.com> wrote: >> 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. >> The present behavior would still be used in case of queries without any >> primary key fields. > > This would require that work be done without text commanding it, which > is IMHO a bad idea. Generally, SQL follows the principle that more > text --> more work: compare SELECT and SELECT DISTINCT (it's more work > to look for duplicates), VACUUM and VACUUM ANALYZE, etc, etc. The > default state is to do the least work that makes sense. (There are > exceptions - UNION ought to be UNION DISTINCT, versus UNION ALL to > reduce the work done - but this is the general rule.) > > Often, a query is done with genuine disregard for order. If you're > going to take the results of the query and stuff them into a > hashtable, you don't care what order they come up in. Why have the > database sort them? Let 'em come in the easiest order possible. > > ChrisA
Back to top | Article view | comp.lang.python
csiph-web