Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用多个数据库时,并且要在多个数据库之间频繁切换,有什么好的解决方案? #831

Open
xiaodouyaer opened this issue Mar 14, 2024 · 0 comments

Comments

@xiaodouyaer
Copy link

我们的应用已经使用了一个数据库,并且数据库的数据存储量已经达到千万级,现有以下几个问题:

1、当我们要增加表或者原有表做结构变更时,变更后更新APP,那么就会导致APP直接卡死(当时数据库大小1.2GB),又对另一台设备进行APP更新(当时数据库大小230MB),APP没有卡死,只是卡顿了一会儿,那么是否是更新表结构导致的这种原因呢?

2、鉴于1中说的现象,我们打算使用多数据库方案,但是我们的数据库1是一个不停高速(300ms写入一帧)读写的数据库,如果通过LitePal.use(litePalDB);去切换数据库的话,是否会导致数据库1的读写丢失?并且频繁切换数据库会导致数据库操作实例频繁创建、销毁,是否会频繁触发GC,进而影响APP整体性能,甚至是影响设备性能?

以上情况可有什么比较好的方案去处理。

另:本人也是计算机初级水平,以上描述皆为个人理解及分析,如有不妥,还望不吝赐教。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant