Can floating point numeric index use inequality in queries?

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)?
 
J

John W. Vinson/MVP

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.
 
J

Jerry Whittle

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top