Data is physically stored by a clustered index, which is usually the primary key, but not required.
Data in SQL cannot guarantee order without an ORDER BY clause. You should always specify an ORDER BY clause when you need data in a specific order. If the table is already sorted in this way, the optimizer will not do any additional work, so there is no harm in its availability.
Without a clause, ORDER BY RDBMS can return cached pages matching your query while it expects to record from disk. In this case, even if the table has an index, the data may not enter the index order. (Note that this is just an example - I don’t know and don’t even think that a real RDBMS will do this, but this is acceptable behavior for implementing SQL.)
EDIT
If you have a performance impact on sorting compared to sorting, you are probably sorting by column (or set of columns) that has no index (clustered or otherwise). Given that this is a time series, you can sort by time, but the clustered index is on the primary version of bigint. SQL Server does not know that both increase the same, so it should resort to all.
If the time column and the primary key column are connected in order (one increases if and only if the other increases or remains unchanged), sort by the primary key. If they are not related this way, move the clustered index from the primary key to any column (s) that you sort.
Welbog
source share