sqldataadapter and performance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I made some performance test with insert statements and got some very bad
scores with sql server.

I dropped a table via drag and drop from server explorer onto my winform.

than i implemented the performance test with the generated connection and
data adapter object.

The scores I got were terrible.

Inserting 10.000 strings last for each 10.00 inserts in minuts
1:30
4:60
6:50
9:30
12:50
15:15.

The time ver growing and growing and I just wondered.

I did the same performance tesst with query analyzer and EACH 10.000 insert
lasted about 6 seconds. So it was clear, it's ADO.

I went down to ADO and tried some things.
Than I found at configure data adapter the option
REFRESH THE DATASET

And this is the devil.

Setting it to false, solved the problem.
I found out, that this option appends a string like select col1, col2, ...
from myable.

So of course at each insert all datarows where selected for nothing.

This option is pretty useless even if set to true, because I did't use a
dataset.

I think this option is pretty wron at the dataadapter.
This option should be set on a dataset for each table, but not at the adapter.

I makes absolutly no sense if no dataset is available.

So do not use this option if you do not need a dataset, it's nonsens and a
performance eater par excelance.

greets
michael
 
yes, it's hidden.

goto configure dataadapter
go through the dialogs until you see
advances options

of have a look at the insert statment of the dataadapter
if the option was set
then there is a select statement after the insert statement.

remove the select statement

than your insert statement runs factors faster, because it is not return
all rows.

greets
 
Back
Top