NETProvider icon indicating copy to clipboard operation
NETProvider copied to clipboard

DataAdapter.Update method is very slow when database is located on flash disks [DNET320]

Open firebird-automations opened this issue 15 years ago • 8 comments

Submitted by: Yiannis Bourkelis (yiannis)

Attachments: SlowFirebirdInsert.zip script.sql

When the attached firebird database is located on a flash drive, the DataAdapter.Update method runs very slow when updating or adding new records. This is not happening on SANDISK CRUZER flash disk, but it is still slow.

I tested it with 2 flash drives, the APACER AH521 and the KINGSTON DT410 and it took around 30 seconds to insert 10 new records.

In the attached project modify the strConnectionString to point to a database located in a flash disk. The database.fdb file is located inside the SlowFirebirdInsert folder.

Using exactly the same code and database schema, but the VISTADB database engine, inserting 10 records took around 2 seconds on the above flash disks.

firebird-automations avatar Jun 02 '10 01:06 firebird-automations

Modified by: Yiannis Bourkelis (yiannis)

Attachment: SlowFirebirdInsert.zip [ 11632 ]

firebird-automations avatar Jun 02 '10 02:06 firebird-automations

Commented by: @cincuranet

Is it slow when you're using i.e. isql?

firebird-automations avatar Jun 02 '10 10:06 firebird-automations

Commented by: Yiannis Bourkelis (yiannis)

Is there any way to see how much time does it take for an INSERT sql statement to execute using ISQL;

I tried to execute an INSERT statement, like the one the dataadapter uses to update the dataset and it looks that it executes fast.

I also tried to do 10 repeated INSERTS (using the keyboard on ISQL - up arrow > enter) and it took me around 5 seconds.

For the same queries using Dataadapter.Update it takes around 30 seconds.

firebird-automations avatar Jun 02 '10 13:06 firebird-automations

Commented by: @cincuranet

Run it like a script.

firebird-automations avatar Jun 02 '10 17:06 firebird-automations

Commented by: Yiannis Bourkelis (yiannis)

Ok, I ran it as a script and it executes very fast.

The attached script.sql contains 215 INSERT statements and completes in less than 500ms when the database resides on a flash disk.

This is what I did: 1.Execute isql.exe 2. connected to database and ran "CON> input "E:\script.sql"

firebird-automations avatar Jun 02 '10 21:06 firebird-automations

Commented by: Yiannis Bourkelis (yiannis)

This script contains 215 insert statements for the attached database.

firebird-automations avatar Jun 02 '10 21:06 firebird-automations

Modified by: Yiannis Bourkelis (yiannis)

Attachment: script.sql [ 11640 ]

firebird-automations avatar Jun 02 '10 21:06 firebird-automations

Commented by: Yiannis Bourkelis (yiannis)

Jiri, where you able to reproduce this issue?

firebird-automations avatar Jun 14 '10 15:06 firebird-automations