Subject | Re: Valid reasons for sorting on a column one doesn't select? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-08-13T18:38:19Z |
Hi Paul!
Anyone can imagine such situations. Selecting the value will of course
add to the volume of data that needs to be transferred as well, and if
you're on a slow internet connection and is interested in an integer
value, but sorted on long (var)char values (I almost forgot that an
order by may involve several fields), I guess it could be significant
(imagine wanting only the phone number, but sorted on country, town,
address, name and date of birth).
Though I've never been in such a situation myself, and think of it as
rather a theoretical than a practical problem. Is Firebird or Oracle
correct? Well, I'm more interested in knowing what the SQL standards
says. If it is silent about the subject, then it is a matter of taste.
Until I learn more about this subject, I consider Firebirds' behaviour
a nice obscurity. And I think of having to select the fields in the
order by as Oracle demands, as a possibly irritating, but
insignificant fact.
Set
> Can anyone give me a few valid reasons whyWell, obviously you want the order, but don't care about the value.
> one might want to sort on a field that
> one doesn't select?
Anyone can imagine such situations. Selecting the value will of course
add to the volume of data that needs to be transferred as well, and if
you're on a slow internet connection and is interested in an integer
value, but sorted on long (var)char values (I almost forgot that an
order by may involve several fields), I guess it could be significant
(imagine wanting only the phone number, but sorted on country, town,
address, name and date of birth).
Though I've never been in such a situation myself, and think of it as
rather a theoretical than a practical problem. Is Firebird or Oracle
correct? Well, I'm more interested in knowing what the SQL standards
says. If it is silent about the subject, then it is a matter of taste.
Until I learn more about this subject, I consider Firebirds' behaviour
a nice obscurity. And I think of having to select the fields in the
order by as Oracle demands, as a possibly irritating, but
insignificant fact.
Set