从sql server迁移到sqlite以获取大型数据集的最快方法

时间:2021-08-12 23:46:34

I have a database with more than 32 million records, I have to migrate it from SQL Server to Sqlite.

我有一个包含超过3200万条记录的数据库,我必须将它从SQL Server迁移到Sqlite。

I have tried SSIS (SQL Server Integration Services) with the help of this article http://dbauman.blogspot.com/2009/03/connecting-to-sqlite-through-ssis.html

我在本文的帮助下尝试了SSIS(SQL Server Integration Services)http://dbauman.blogspot.com/2009/03/connecting-to-sqlite-through-ssis.html

but the process is very very slow, how can I migrate this data?

但是这个过程非常慢,我该如何迁移这些数据呢?

2 个解决方案

#1


9  

There is a C# utility to automatically do conversion from a SQL Server DB to a SQLite DB by liron.

有一个C#实用程序可以通过liron自动从SQL Server DB转换为SQLite DB。

Here is the code project article.

这是代码项目文章。

#2


2  

I suggest to use transactions in SQLite, else the Indices are built with every new record added, not when one block of work is done.

我建议在SQLite中使用事务,否则使用添加的每个新记录构建Indices,而不是在完成一个工作块时。

As i don't know about the structure of your data, it is hard to give concrete advice, but writing a small application that can read from SQLServer and write to SQLite is often a practical start for migration. With the bonus of having a full wrapper after migration, which you can use in future.

由于我不知道数据的结构,很难给出具体的建议,但编写一个可以从SQLServer读取并写入SQLite的小应用程序通常是迁移的实际开始。在迁移后拥有完整包装器的好处,您可以在将来使用它。

#1


9  

There is a C# utility to automatically do conversion from a SQL Server DB to a SQLite DB by liron.

有一个C#实用程序可以通过liron自动从SQL Server DB转换为SQLite DB。

Here is the code project article.

这是代码项目文章。

#2


2  

I suggest to use transactions in SQLite, else the Indices are built with every new record added, not when one block of work is done.

我建议在SQLite中使用事务,否则使用添加的每个新记录构建Indices,而不是在完成一个工作块时。

As i don't know about the structure of your data, it is hard to give concrete advice, but writing a small application that can read from SQLServer and write to SQLite is often a practical start for migration. With the bonus of having a full wrapper after migration, which you can use in future.

由于我不知道数据的结构,很难给出具体的建议,但编写一个可以从SQLServer读取并写入SQLite的小应用程序通常是迁移的实际开始。在迁移后拥有完整包装器的好处,您可以在将来使用它。