#1 2016-10-20 11:16:52

turrican
Member
From: Barcelona
Registered: 2015-06-05
Posts: 94
Website

Clone database using mORMot

Hi,

I need to clone a database with all the objects inside and I don't need synchronization. I want to change database engine to another but first I need to clone structure and data inside.

There is a TSQLRest clone method to another TSQLRest without using syncronization? Or what is the best way to do this with mORMot.

Thanks!

Last edited by turrican (2016-10-20 11:17:40)

Offline

#2 2016-10-20 14:15:47

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,183
Website

Re: Clone database using mORMot

From/to which database engine are you migrating?

There is no built-in tool for this.

Only if you want to target SQlite3, you could try to use SynDBExplorer to create a SQLite3 file from any external DB connection.

Offline

#3 2016-10-20 15:44:32

turrican
Member
From: Barcelona
Registered: 2015-06-05
Posts: 94
Website

Re: Clone database using mORMot

SQLite3 to MSSQLServer

I'm suffering perfomance problems with SQLite3. Update batches are veeeeeryy slow on a 7GB table (no hardware issues or slow disk/network). I need to update more than a milion rows and it's painful.

Last edited by turrican (2016-10-20 15:46:03)

Offline

#4 2016-10-20 19:24:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,183
Website

Re: Clone database using mORMot

I'm not sure it will be faster with MSSQL, honestly...
But it may be done in background, so the DB won't be locked during the process.

Offline

#5 2016-10-21 08:30:47

turrican
Member
From: Barcelona
Registered: 2015-06-05
Posts: 94
Website

Re: Clone database using mORMot

Hi Ab,

Yes of course, I'm doing it as background process with 500 row per batch update transaction.

Thanks for your suggestions.

Offline

#6 2017-04-20 09:34:04

cybexr
Member
Registered: 2016-09-14
Posts: 78

Re: Clone database using mORMot

Maybe there are too much index on your sqlite table ?  7GB table may counts 2~3 billion rows , update is not easy on any RDBMS. I'm curious whether your MSSQL faster now ?  @turrican

Offline

#7 2017-04-21 06:11:33

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: Clone database using mORMot

I had the same curiosity - turning performance is always a good topic.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#8 2017-04-25 08:35:25

turrican
Member
From: Barcelona
Registered: 2015-06-05
Posts: 94
Website

Re: Clone database using mORMot

cybexr wrote:

Maybe there are too much index on your sqlite table ?  7GB table may counts 2~3 billion rows , update is not easy on any RDBMS. I'm curious whether your MSSQL faster now ?  @turrican

Finally was the Hard Disk Volume perfomance... very fast with another server.  I don't move from SQLite3 engine smile

Offline

#9 2017-04-25 08:40:46

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: Clone database using mORMot

@turrican, thanks for getting back to this thread and sharing the info with us. And yes, good to hear that, SQLite3 never failed us:)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#10 2017-04-25 09:16:08

turrican
Member
From: Barcelona
Registered: 2015-06-05
Posts: 94
Website

Re: Clone database using mORMot

edwinsn wrote:

@turrican, thanks for getting back to this thread and sharing the info with us. And yes, good to hear that, SQLite3 never failed us:)

No problem! You are welcome!

Offline

Board footer

Powered by FluxBB