John Salvo wrote:
Quote:
Is it a fair assumption that ASE ( using 12.5.0.3 ) will not use an
index if the WHERE clause:
1) Uses a range ( >, >=, <, <=, or combination thereof ) instead of
equality ( = ) .. AND
2) The search-argument is non-literal ( value from function or even a
bind variable / placholder ) |
It can use an index in a range query if a suitable index exists.
A less than or less than or equal query, perhaps not, unless the
index is descending. A value from a function should be OK. There
are some issues with literals and local variables in sprocs though.
The P&T Guide should cover this.
Quote:
Consider the following 2 queries below. The query is guaranteed not to
return any rows and statistics on both table and indexes were just
updated prior to this. |
Are you running this within an sproc? It might be an idea to post
this message to the ase.performance+tuning newsgroup on Forums and
get Eric Miner's attention.
-am © 2003