B
borophyll
Hi,
I am wanting to iterate over the set of records in an Access database
table programmatically using an OleDbDataReader. This works fine
using a plain SELECT statement. However, I want them to be read in
sorted on a particular field. So, I added an ORDER BY clause. This
made the program hang and caused the system to perform poorly (it
appears to have used all the memory). I should mention that the table
contains about 5 million records, so it is likely it is struggling to
sort these records well. As it is unacceptable for the program to
perform like this, is there some way to 'presort' the records in the
database, so that the Access table is internally already in the
correct order? I tried dierctly sorting the table using Access, but
apparently this doesn't really sort the table, it will just apply a
sort query everytime the table is opened. Any help on what I could do
would be appreciated.
Regards,
Michael
I am wanting to iterate over the set of records in an Access database
table programmatically using an OleDbDataReader. This works fine
using a plain SELECT statement. However, I want them to be read in
sorted on a particular field. So, I added an ORDER BY clause. This
made the program hang and caused the system to perform poorly (it
appears to have used all the memory). I should mention that the table
contains about 5 million records, so it is likely it is struggling to
sort these records well. As it is unacceptable for the program to
perform like this, is there some way to 'presort' the records in the
database, so that the Access table is internally already in the
correct order? I tried dierctly sorting the table using Access, but
apparently this doesn't really sort the table, it will just apply a
sort query everytime the table is opened. Any help on what I could do
would be appreciated.
Regards,
Michael