Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.61k stars 1.39k forks source link

为什么初始化时select count(*) from message执行超过100ms #1103

Closed Yellowyzzz closed 1 month ago

Yellowyzzz commented 1 month ago

The language of WCDB

Kotlin

The version of WCDB

v1.0.8.2

The platform of WCDB

Android

The installation of WCDB

e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone

What's the issue?

目前使用room+wcdb 1.0.8.2版本,在SQLiteTrace.onSQLExecuted上报埋点,发现在执行时间>100ms的sql中,select count(*) from message占比超过30% 本地测试的时候打印log也可以看到这条sql执行时间与其他相比是较长的

wcdb_init

顺便问一下为什么2.x版本不支持room了,升级有较大改动成本

Qiuwen-chen commented 1 month ago

You can use "explain query plan" to analyze your query process.

Qiuwen-chen commented 1 month ago

We don't use room, so there are no plans to support it now.