【发布时间】:2012-03-22 15:21:29
【问题描述】:
我有两台设备:装有 Android 2.2 Froyo 的 HTC Desire 和装有 Android 2.3 Gingerbread 的 HTC Evo 3D。
我的sql请求:
SELECT DISTINCT Album.titre, Serie.nbAlbum
FROM Serie, Album
WHERE Serie.titre=Album.serieTitre AND Album.shz=1
使用非索引数据库:
htc evo 3d : Everything works fine, the query runs in ~1 second.
htc desire : This is much longer! about 30 - 50 seconds.
所以,我尝试使用以下方法索引我的表:
CREATE INDEX IDX_ALBUM_SHZ on ALBUM (shz)
CREATE INDEX IDX_ALBUM_SERIETITRE on ALBUM(serieTitre)
但结果却相反!
HTC Desire : Really fast, ~1 second.
HTC Evo 3d : Very slow, more than 20 seconds
你知道发生了什么吗?
froyo 和姜饼之间的 sqlite 管理方式是否发生了重大变化?
如何解决这个问题?
【问题讨论】:
标签: android sqlite indexing android-2.2-froyo android-2.3-gingerbread