sql - Does order by in view guarentee order of select? -


I have a view for which it only makes sense to use a certain order. To see what I would like to do, include the ORDER BY clause, so that all SELECT s on that view, leave it. However, I'm worried that the order should be < No need to move to code> SELECT , because it does not specify the order.

Is there any case where the order specified by which a sequence of results will not be reflected on the result (except the order of the section of the view) of a selection?

You can not rely on the order of rows in any query, which is not clear ORDER BY section If you ask a given order, but you do not include a ORDER BY section, please be amazed that they are in the correct order, and it is again Do not expect to be.

This is because the query optimizer is free to access rows in different ways depending on the query, table statistics, line count, index etc. If it knows that there is no ORDER BY section in your query, then the row order is more free to ignore the line order.

A little distant-subject . .

The sequential order is not the same for all known call centers in all platforms. I think the sorting UTF-8 on Mac OS X is particularly weird. (PostgreSQL developers call it broken .) The postgrasquel is dependent on SRCL (), which I think depends on the OS locale.

It is not clear to me how to handle this PostgreSQL 9.1. In 9.1, an order that does not specify a collation, will usually use the matching of columns of the base base table, but the adapter What will one do with an index , which specifies a different match than a synaptic column in the base table?

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -