Group: Awaiting Activation
Posts: 172,
Visits: 12K
|
Is there a way to put an index on the business object's data table so that a Seek() command executes more quickly?
I have a relatively small dataset (225,000) records each of which only has 3 fields of data (so the memory footprint is rather small). The problem is that I'm validating over a million records against this dataset. If the seek takes a second (which is about how long it takes) that is 277 minutes or 4.6 hours of validations.
My assumption was that if I loaded up the entire table in the business object that the seek would be almost immediate.
Here is the seek string:
string seekString = String.Format("wnf_name = '{0}' AND wnf_lat = {1} AND wnf_long = {2}", fixName.Trim(), latitude, longitude);
wnf_name is a String, wnf_lat is a Double and wnf_long is also a Double ... I'm betting it is the Doubles that are causing the slow down. I wonder if I converted the Double to String that the seek would be faster?
Thanks!
Charles T. Blankenship Senior Consultant Novant Consulting, Inc. 704.975.7152 http://www.novantconsulting.com
|