Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
firebird-automations opened this issue Jun 2, 2010 · 8 comments

Comments

@firebird-automations
Copy link

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
Copy link
Author

Modified by: Yiannis Bourkelis (yiannis)

Attachment: SlowFirebirdInsert.zip [ 11632 ]

@firebird-automations
Copy link
Author

Commented by: @cincuranet

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

@firebird-automations
Copy link
Author

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
Copy link
Author

Commented by: @cincuranet

Run it like a script.

@firebird-automations
Copy link
Author

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
Copy link
Author

Commented by: Yiannis Bourkelis (yiannis)

This script contains 215 insert statements for the attached database.

@firebird-automations
Copy link
Author

Modified by: Yiannis Bourkelis (yiannis)

Attachment: script.sql [ 11640 ]

@firebird-automations
Copy link
Author

Commented by: Yiannis Bourkelis (yiannis)

Jiri,
where you able to reproduce this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants