![]() However, most indexes are designed in a way that results in a secondary READ of the base table to obtain all data required for the query. The advantage of utilizing more than one index is to gain efficient access into data other than the primary key. Tip #10: Use ‘Cover’ Indexes Where Possible An alternative might be to structure, via primary key and/or an Index, in a manner that results in the data in the order needed to satisfy the business requirements without utilizing a SORT operation. There are many reasons for processing data in a specific order however, it is imperative to limit the ORDER BY clause to queries where the business requirements call for the data to be in a specific order. Tip #9: The ORDER BY Clause is Mandatory in a Query Where Sorted Data is Mandatory An RDBMS engine requires a materialized intermediate result set before being able to evaluate the TOP condition. Unfortunately, this is simply not the case. There is a common misconception that when the TOP condition has been satisfied, query execution terminates. Tip #8: Limit the Utilization of TOP Function Query execution is suspended until the temporary table can be populated. Query execution time is negatively impacted because of the extra I/O operations to READ the initial data, WRITE the data to the temporary table, READ data from temporary table, and lastly dropping the temporary table. However, there are several reasons to either limit or eliminate the use of temporary tables: Advances in RDBMS engines are now capable of providing this functionality automatically at run time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |