SQLiteDump.Restore extremly slow

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
Fretek
Posts: 8
Joined: Sun 13 Mar 2011 12:03

SQLiteDump.Restore extremly slow

Post by Fretek » Sun 13 Mar 2011 12:19

I use the SQLiteDump.Restore method to restore my sqlite db. First I read in the backupscript into an streamreader, then call Restore (in an transaction). The backupscript includes ca 5000 insert statements to diffrent tables. But the operation is very,very slow. 10-15 minutes. Is there any other solution to backup and restore an sqlite database?

My code:

Code: Select all

var streamReader = new StreamReader(pRestoreFilePath, Encoding.UTF8);  
                if (mSqLiteConnection.State != ConnectionState.Open)
                   mSqLiteConnection.Open();

                var sqSqlDump = new SQLiteDump {Connection = mSqLiteConnection};
                SQLiteTransaction transaction = mSqLiteConnection.BeginTransaction(IsolationLevel.ReadCommitted);

                
                sqSqlDump.Restore(streamReader);
                transaction.Commit();

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 14 Mar 2011 13:19

I have checked the 3.10.121 version of dotConnect for SQL using the code that I have just sent to your e-mail address. Here is my output:
Table is populated with 5000 rows in 00:00:00.1493707
Backup is created in 00:00:00.0614540
Table is restored in 00:00:00.2384974


Please give us the following:
1) the exact version (x.xx.xxx) of your dotConnect for SQLite. You can find it in the Tools > SQLite > About menu of Visual Studio;
2) the target framework of your project;
3) modify and send our code back to us to reproduce the problem in our environment. If necessary, attach your database.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 24 Mar 2011 12:11

We have reproduced and fixed the problem.

New build of dotConnect for SQLite 3.10.126 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/sqlite/download.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=20588 .

Fretek
Posts: 8
Joined: Sun 13 Mar 2011 12:03

Post by Fretek » Thu 24 Mar 2011 19:19

Many thanks for this release Devart. Excellent support!!!

Post Reply