6

I'm wondering if there is a faster method than using something like:

while (Reader.Read())

to read the results of mysql select queries.

I'm randomly pulling 10,000 rows from a database and would like to read it as quickly as possible. Is there a way to serialize the results if we know what they are (such as using the metadata to setup a structure)?

1 Answer 1

5

Try MySQLDataAdapter.Fill method to fill any DataTable object - read speed is comparable to optimal usage of read data with Read method (depends on your while block reading way) and main advantage is that you achieve prepared data collection which you can manage or just write to XML file.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.