问题描述
我已经升级我的Nexus 7与Android 5.0棒棒糖,在这之前我的应用程序进展顺利是 SQLite数据库但是现在每当我执行任何类型的查询,它给我的登录猫误差这样的:
I have upgraded my Nexus 7 with Android 5.0 Lollipop, Before that my application going well with SQLite Database but now Whenever I execute any type of query, It gives me log cat error like:
12-09 12:37:04.942: E/SQLiteLog(13041): (284) automatic index on area(server_id)
12-09 12:37:04.942: E/SQLiteLog(13041): (284) automatic index on account(area_id)
12-09 12:37:04.942: E/SQLiteLog(13041): (284) automatic index on staff_visit(account_id)
12-09 12:37:04.942: E/SQLiteLog(13041): (284) automatic index on ordertab(account_id)
12-09 12:37:04.960: E/SQLiteLog(13041): (284) automatic index on area(server_id)
12-09 12:37:04.960: E/SQLiteLog(13041): (284) automatic index on account(area_id)
12-09 12:37:04.960: E/SQLiteLog(13041): (284) automatic index on staff_visit(account_id)
12-09 12:37:04.960: E/SQLiteLog(13041): (284) automatic index on ordertab(account_id)
12-09 12:37:04.978: E/SQLiteLog(13041): (284) automatic index on area(server_id)
12-09 12:37:04.978: E/SQLiteLog(13041): (284) automatic index on account(area_id)
12-09 12:37:04.978: E/SQLiteLog(13041): (284) automatic index on staff_visit(account_id)
12-09 12:37:04.978: E/SQLiteLog(13041): (284) automatic index on ordertab(account_id)
那么,它的任何棒棒糖误区错误?我想是这样,因为我不前,这种升级操作系统后,已经更新了我的code。
So Is it Error of Any Lollipop Mistakes? I think so because i dont have updated my code before and after upgrading this OS.
推荐答案
自动索引于3.7源码介绍0.17。一个版本的SQLite使用此功能只有包含在Android的大号开发preVIEW 一>。这就是为什么你只在棒棒堂,但不是更早的消息。即使它被记录为一个错误,它实际上只是一个消息。
Automatic indexing was introduced in sqlite 3.7.17. A version of sqlite with this feature was only included in Android L developer preview. This is why you get the message only on Lollipop but not earlier. Even if it is logged as an error, it's really just a message.
基本上,自动标引进入,当你在做在非索引列查找播放。 sqlite的假设有这么多的数据生成一个临时指数比原始查询便宜。
Basically, the automatic indexing comes into play when you're doing lookups on non-indexed columns. sqlite assumes there's so much data that generating a temporary index is cheaper than raw lookup.
考虑加入明确的,永久的指标为您查找列与 CREATE INDEX
。例如,你的 CREATE TABLE后
:
Consider adding explicit, permanent indices for your lookup columns with CREATE INDEX
. For example, after your CREATE TABLE
:
CREATE INDEX indexname ON tablename(columnname);
在这里你可以选择表名(columnName)以
从作为生产的源码,自动索引信息
where you can pick tablename(columnname)
from the autoindex messages as produced by sqlite.
如果你只是想旧的行为后面,你可以禁用自动索引与
If you just want the old behavior back, you can disable auto-indexing with
PRAGMA automatic_index=off;
这篇关于SQLite数据库给出警告的&LT自动索引; table_name的>(列)的Android升级后l的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!