On 08/13/2013 02:28 PM, Sqlite Dog wrote:
We are using SQLite 3.7.17

Maybe you can use this stuff:

  http://www.sqlite.org/c3ref/stmt_status.html
  http://www.sqlite.org/c3ref/c_stmtstatus_counter.html

In particular SQLITE_STMTSTATUS_FULLSCAN_STEP.

Dan.






2013/8/13 Sqlite Dog <[email protected]>

What is a best way to detect that query does full table scan? Considering
this (from http://www.sqlite.org/eqp.html ):

"Warning: The data returned by the EXPLAIN QUERY PLAN command is intended
for interactive debugging only. It may change dramatically between SQLite
releases. Applications should not depend on the results of an EXPLAIN QUERY
PLAN command."

Is it enough (and reliable) to search detail column of EXPLAIN QUERY PLAN
for "SCAN TABLE%" and (if found) presume that query does full scan?

The problem. We have a very large table with a lot of quering. So we came
along with 4 complex covering indices and want to prohibit queries that
does not supply enough values to avoid full scanning.


--
Regards,
SqliteDog support team




_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to