Small. Fast. Reliable.
Choose any three.
*** 4,10 ****
  *Download* idxchk from the contrib section: http://sqlite.org/contrib
  
  idxchk uses the output from the EXPLAIN command, along with table and
! index meta data stored in the _sqlite_master_ table.  idxchk works with 3.0.8 through 3.2.1, probably other versions.
  SQLite opcodes are considered private and can change from version to version,
  so be warned, that idxchk may not work correctly for other versions.
  
--- 4,10 ----
  *Download* idxchk from the contrib section: http://sqlite.org/contrib
  
  idxchk uses the output from the EXPLAIN command, along with table and
! index meta data stored in the _sqlite_master_ table.  idxchk works with 3.0.8 through 3.2.7, probably other versions.
  SQLite opcodes are considered private and can change from version to version,
  so be warned, that idxchk may not work correctly for other versions.
  
***************
*** 14,19 ****
--- 14,27 ----
  in front of a query to get a description of what indices are being
  used.
  
+ _: Oct 20, 2005 - idxchk still works with version 3.2.7, and still provides a 
+ little more information than EXPLAIN QUERY PLAN.  Most notably, idxchk will
+ report when primary key indexes or rowids are being used in a query.  
+ If this reporting
+ can be rolled into EXPLAIN QUERY PLAN, then idxchk can be retired.  Also,
+ newer index optimizations in SQLite have rendered some of the examples
+ out of date, see below. -Tom Poindexter
+ 
  
  Run idxchk as:
  
***************
*** 250,256 ****
  
  
  What?  No improvement.  Remember that SQLite *always* loops over every row in
! the first table in the query.  What we might want to do is first create a
  temporary table of only writings by Kernighan; then use that temp table in
  a second query.  idxchk will execute all statements in batch, and only
  analyze the last statement, so we can execute the CREATE TEMP TABLE as
--- 258,271 ----
  
  
  What?  No improvement.  Remember that SQLite *always* loops over every row in
! the first table in the query.  
! 
! _: Note that recent query plan optimizations in SQLite 3.2.7, will allow the
! index au_name_idx to be used.  The result of running idxchk with 3.2.7 
! on this query will correctly report that the index is used in this query.
! 
! 
! What we might want to do is first create a
  temporary table of only writings by Kernighan; then use that temp table in
  a second query.  idxchk will execute all statements in batch, and only
  analyze the last statement, so we can execute the CREATE TEMP TABLE as