开发者

Replace SQLite with SQL Server?

开发者 https://www.devze.com 2023-01-09 11:52 出处:网络
Does anyone know if it\'s good solution to use SQLite in multi-thread environment. I want to replace SQL Server with more simple and built-in database as there is no need to feed such big serve开发者_

Does anyone know if it's good solution to use SQLite in multi-thread environment. I want to replace SQL Server with more simple and built-in database as there is no need to feed such big serve开发者_运维问答r DB. The supposed max size of DB would be 4 gigabyte after 4-5 years of usage. Is it normal for built-in DB? Could it affect performance?


It depends on the type of queries you would use. If the queries are simple selects with plain joins, then SQLite could do fine but I think you would still be better off with e. g. Firebird 2.5 when the stable release gets out (RC3 is available now). You would have somewhat richer SQL to work with. I don't know how much bulk loads are important for you, but neither SQLite nor Firebird are very strong in this area. If you need good bulk insert performance and low cost, then you should look at PostgreSQL or MySQL. There is also a very interesting looking database I happened to stumble upon recently called CUBRID. I have only installed it so far, so I can't tell how good or bad it is but it certainly seems worth a look. You might also want to look at this wikipedia article: http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems


I don't know which distro you're talking about here. I've only used SQLite.NET and I know it works well on multithreaded applications.

It can also be deployed on client-server systems so you need not worry at all.

Considering Vinko's statement of 'real' databases, you can ignore him. SQLite is really worth it's salt.

If you're working with .NET, you might find this link useful: http://sqlite.phxsoftware.com


According to the documentation SQLite is thread safe but there are caveats.


You can use SQLite in a multithreaded environment, but if and only if you build a special version of it (and find out if the library you'll be using it supports it and tweak it if it doesn't.) So, assuming your library supports multithreaded SQLite, if you really need a high level of concurrency to the database you may prefer to use a 'real' database. Be it MSSQL or any other falls out of the scope of the question.

Consider MySQL and SQL Server Express, for example.

If your concurrency level is low, SQLite can cope with it.


I would also suggest you to take a look at the CUBRID database. It has nice optimizations for Web applications and it is easy to learn.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号