Can floating point numeric index use inequality in queries?

  • Thread starter Thread starter harolde
  • Start date Start date
H

harolde

I have 2 floating point numeric columns that I am using in queries with
inequality criteria for those columns.

Will indexes on those column be useful (i.e. can they be used to speed up
the query)?
 
harolde said:
I have 2 floating point numeric columns that I am using in queries with
inequality criteria for those columns.

Will indexes on those column be useful (i.e. can they be used to speed up
the query)?

Yes. Depending on how the numbers are generated, though, you may have
roundoff error causing mismatches - two values which look identical might be
off in the last decimal place.
 
A criteria of = might be a problem; however > or < criteria might really
speed things up. A lot depends on the cardinality of your data.

In cases like this, a good old-fashion stopwatch ends a lot of speculation.
Just remember to do the timing after running the query at least once so that
Access can optimize it.
 
Back
Top