零满意度的VC ++高效数据库 [英] VC++ Efficient Database with zero mentainence

查看:63
本文介绍了零满意度的VC ++高效数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我们将sqlite3用作我们软件中带有vc ++代码的后端数据库.我们不使用MySql或其他数据库,因为它将给客户端带来维护费用.安装My sql服务器,然后启动服务器,等等.]但是由于sqlite3是为嵌入式系统设计的,因此它们对于产品的输出速度并不慢[即使我已将sqlite3 PRAGMA更改为使其速度更快并且它也提高了速度.排序,重复检查等仍然很慢,并且作为单个平面文件,我们有一些限制.].

Hi All,
We are using sqlite3 as back-end database with vc++ code in our software.We are not using MySql or other DB, as it will have an maintenance overhead for client [e.g. install the My sql server then start the server etc.].But as sqlite3 is is made for embedded system they are little slow for out product [even though I have changed the sqlite3 PRAGMA to make it fast and it improved the speed also. still its slow for sorting,duplicate check etc. and as its a single flat file we have some limitation.].

execDML("PRAGMA synchronous = OFF;");
           //execDML("PRAGMA journal_mode = OFF;");
           execDML("PRAGMA locking_mode = EXCLUSIVE;");
           //execDML("PRAGMA temp_store = MEMORY;");
           //execDML("PRAGMA count_changes = OFF;");
           execDML("PRAGMA PAGE_SIZE = 4096;");
           execDML("PRAGMA default_cache_size=700000;");
           execDML("PRAGMA cache_size=700000;");
           execDML("PRAGMA compile_options;");
           execDML("VACUUM;");



我的问题是,有没有比sqlite3更好,更快的数据库可以与VC ++集成而无需安装或配置它?



My question is there any better and faster DB than sqlite3 that can integrate with VC++ without installing or configuring it?

推荐答案

尝试此链接 http://en.wikipedia.org/wiki/Embedded_database [ http://en.wikipedia.org/wiki/EXtremeDB [
try this link http://en.wikipedia.org/wiki/Embedded_database[^]

one of DB looks good there is http://en.wikipedia.org/wiki/EXtremeDB[^]


尝试使用索引.使用索引字段时,排序和筛选要快得多.
Try using indexes. Sorting and filtering is much faster when using indexed fields.


实际上只有两种类型的数据库:嵌入式数据库和服务器.

嵌入式使用来自您的应用程序的驱动程序"来访问数据库.他们不需要安装.内存等由驱动程序管理.

服务器在PC中具有专用的OS线程(或更多线程)用于数据库.该线程可以缓存结果,解决冲突(多次写入和读取之间的冲突),延迟写入,改善空闲状态下的数据库文件.
该数据库专用线程还可以更好地处理内存,安全性等.它还可以处理网络访问.
但是,为了使用数据库,必须安装并绑定数据库进程".

对于嵌入式,我认为SQLite是最好的之一.但是它不允许多次写入(多用户),并且性能永远不会匹配专用的线程服务器数据库.
There are really only 2 types of databases, embedded and server.

Embedded use a "driver" from your application to access the database. They don''t need to be installed. Memory, etc is managed from the driver.

Server have a dedicated OS thread (or more) for the database in the PC. That thread can cache results, resolve conflicts (collisions between multiples writes and reads), delay writes, improve database files when idle.
That database dedicated thread can also handle memory better, security, etc. It can also handle network access.
But in order to use the database the "database process" must be installed and lanched.

For embedded, I think SQLite is one of the bests. But it won''t allow multiple writes (multiuser), and performance will never match a dedicated thread server database.


这篇关于零满意度的VC ++高效数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆