1.4 Ordering data for performance

Texis will read data in physical table order if there is no advantage to ordering differently. This is designed to improve performance by keeping disk seeks to a minimum. If the data in a table is static then it is useful to load the data in the order that you want to select the records most of the time, thereby avoiding the need for an order by.

Texis will read the data in a different order in a few cases. If you specify an ORDER BY clause then the results will be ordered accordingly. If you are performing a LIKER or LIKEP query then the results will be in relevance rank order. If there is a single part of the WHERE clause, and an index to resolve it, the results will be in index order. Examples of ordered result sets, using the Webinator html table:

  • SELECT Title FROM html ORDER BY Visited;
  • SELECT Title FROM html where Title\Meta\Body LIKEP 'query';
  • SELECT Title FROM html where id > '-1 hour';
Back: Disk layout of the table and indexes Next: Counter data type, other types
Copyright © 2024 Thunderstone Software LLC. All rights reserved.