android - 你如何根据 SQLite 文档调整 Android 的 SQLite,例如杂注缓存大小?

标签 android sqlite

SQLite 文档在这里 http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html#pragmas看起来很有趣。有没有办法在 Android 中尝试它的建议?

最佳答案

引用 the SQLite documentation :

The PRAGMA statement is an SQL extension specific to SQLite and used to modify the operation of the SQLite library or to query the SQLite library for internal (non-table) data. The PRAGMA statement is issued using the same interface as other SQLite commands (e.g. SELECT, INSERT)

因此,我希望 SQLiteDatabase 上的 execSQL() 应该与不返回任何结果集的 PRAGMA 一起工作。

如果 PRAGMA 影响 SQLite 语句的编译,请尝试使用 SQLiteDatabasecompileStatement() 看看是否可行。我希望它映射到 SQLite C API 中的 sqlite3_prepare(),尽管我不确定这一点。

关于android - 你如何根据 SQLite 文档调整 Android 的 SQLite,例如杂注缓存大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7098152/

相关文章:

Android:更改启动器 Activity 的正确方法(完整阅读)

android - 在网格菜单中打开不同的 Intent 并在其中导航

c# - 如何将 BLOB 数据添加到 mySQL 命令中

sqlite - 如何将 SQLite 导出为 JSON?

Android OrmLite TableUtils 创建 View

ios - 在 Objective-C 中的按钮文本中显示数组元素

android - 如何使用 firebase auth android 无法返回 android

java - 应用程序从 URL 检索图像并在 Android 应用程序中显示时崩溃

android - 保存 RecyclerView 列表状态

objective-c - 插入语句不适用于sqlite3 iPhone中的同一数据库上的第二个表