S
Simon Morris
In ADO Classic, the .Seek method is a very quick way to find one record in a
Jet table. In a 500,000 record table that has a primary key index on the
value sought, ADO can seek a single record in around .001 of a second and
allow the application to grab the column values from that record for later
processing.
My application needs to gather into a result table anything from a few dozen
to several thousand related records, where the next record required depend
on the record(s) previously retreived.
I've created an ADO.NET version of the same thing that uses SQL Selects into
a DataReader and then populates my result table. The trouble is that it is
nearly 6 times slower using the same data as the old .Seek.
I've been checking and I'm certain the slowdown is the Select, ie:
SELECT id, ParentID FROM MyTable WHERE id = ... which will either return 0
or 1 records.
I'm very keen to change over to ADO.NET, but need some help to get the
required performance. I've added a reference to ADO Classic in my VB.NET
experiment and using .Seek there produces the required results, but I'd like
to see if there's an ADO.NET solution.
Any help appreciated,
Simon
Jet table. In a 500,000 record table that has a primary key index on the
value sought, ADO can seek a single record in around .001 of a second and
allow the application to grab the column values from that record for later
processing.
My application needs to gather into a result table anything from a few dozen
to several thousand related records, where the next record required depend
on the record(s) previously retreived.
I've created an ADO.NET version of the same thing that uses SQL Selects into
a DataReader and then populates my result table. The trouble is that it is
nearly 6 times slower using the same data as the old .Seek.
I've been checking and I'm certain the slowdown is the Select, ie:
SELECT id, ParentID FROM MyTable WHERE id = ... which will either return 0
or 1 records.
I'm very keen to change over to ADO.NET, but need some help to get the
required performance. I've added a reference to ADO Classic in my VB.NET
experiment and using .Seek there produces the required results, but I'd like
to see if there's an ADO.NET solution.
Any help appreciated,
Simon