M
mich_stone
Hi world.
I have a dataadapter whose select statements does some joins between
some tables and a view.
Running this select statement in Query Analyzer gives me my result in
under 2 seconds (i can digest it even if it takes 4 seconds which is
twice this time).
But when i do myAdapter.Fill (myTypedDataSet); it takes about 15
seconds to complete!!!
Why? If my query is so bad then won't it take as much time in query
analyzer?
To make sure it is a filling problem, I clicked on my DataAdapter (in
design mode), and in the properties window, clicked PREVIEW DATA, chose
my dataset, "FILL" and still the same thing.
To make diagnosis simpler, I have tried the following and all gave the
same slow results
1. Converting typed dataset to untyped
2. Removing key from dataset and putting back etc
3. (i read somewhere that people disagree when they talk about
datareaders vs. datasets) Using datareader instead of dataset as a
datasource.
4. did a while (reader.Read()); just to see how much time my debugger
will remain on that line, and believe me, it took the same 15 seconds.
Thanks a lot...
Regards,
Michelle
I have a dataadapter whose select statements does some joins between
some tables and a view.
Running this select statement in Query Analyzer gives me my result in
under 2 seconds (i can digest it even if it takes 4 seconds which is
twice this time).
But when i do myAdapter.Fill (myTypedDataSet); it takes about 15
seconds to complete!!!
Why? If my query is so bad then won't it take as much time in query
analyzer?
To make sure it is a filling problem, I clicked on my DataAdapter (in
design mode), and in the properties window, clicked PREVIEW DATA, chose
my dataset, "FILL" and still the same thing.
To make diagnosis simpler, I have tried the following and all gave the
same slow results
1. Converting typed dataset to untyped
2. Removing key from dataset and putting back etc
3. (i read somewhere that people disagree when they talk about
datareaders vs. datasets) Using datareader instead of dataset as a
datasource.
4. did a while (reader.Read()); just to see how much time my debugger
will remain on that line, and believe me, it took the same 15 seconds.
Thanks a lot...
Regards,
Michelle