Hello all,
I found that the access to an indexed column without "order by" is slower than
the one with "order by" in SQLite 3071300.
Using an index rather than an actual column is faster even if there is no need
to use the index when the column has index.
In general, to fetch column value, there is no need to access actual column
when it has a dedicated index or it is a first column of composite index.
I hope SQLite would do this optimization which is common to other DBMSs.
Followings are the results of the comparison. Time column of main table has an
index.
After disk cache is cleared,
SQL: select time from main order by time;
Total : 38.1312 sec
SQL: select time from main;
Total : 95.395 sec
When data is cached,
SQL: select time from main order by time;
Total : 0.497981 sec
SQL: select time from main;
Total:: 0.925122 sec
Thank you for developing a very cool DBMS, SQLite!
Kohji Nakamura
--
[email protected] http://www.nao.ac.jp/E/index.html
National Astronomical Observatory of Japan
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users