Order of Where Clauses
Posted: Fri Mar 14, 2003 10:10 am
I have several where clauses in my select statements in my vortex scripts. From what I have read, vortex executes the where clauses from left to right. I am trying to optimize the performance of my queries, and based on what I understand about the way texis executes queries, it would make sense that the proper ordering of the where clauses could increase performance. For example, maybe doing a search on an integer column first, would allow texis to resolve the query faster and reduce the set of possible results for the next, maybe slower, where clause. Or maybe a general rule might be to always put the where clause that will reduce the result set the most first. I guess I am just looking to see if you have any rules/suggestions/guideline on ordering the where clauses in my SQL statements. Assume all fields are indexed. -Thanks.