/ Check-in [daa8314f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the estimated number of output rows to the EXPLAIN QUERY PLAN output if compiled with SQLITE_EXPLAIN_ESTIMATED_ROWS. This feature is off by default for the time being.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: daa8314fba9dc3c4f5e7fbda42c97604fbfc4392
User & Date: drh 2014-10-10 17:20:39
Context
2014-10-10
17:44
Provide the new "-config CONFIG" option to the test/releasetest.tcl script, which allows one to run a single test configuration selected by name. check-in: d479e32b user: drh tags: trunk
17:20
Add the estimated number of output rows to the EXPLAIN QUERY PLAN output if compiled with SQLITE_EXPLAIN_ESTIMATED_ROWS. This feature is off by default for the time being. check-in: daa8314f user: drh tags: trunk
15:47
Simplify the code used to generate the text for EXPLAIN QUERY PLAN. check-in: beea1efc user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  2871   2871         sqlite3StrAccumAppendAll(&str, zRange);
  2872   2872       }
  2873   2873   #ifndef SQLITE_OMIT_VIRTUALTABLE
  2874   2874       else if( (flags & WHERE_VIRTUALTABLE)!=0 ){
  2875   2875         sqlite3XPrintf(&str, 0, " VIRTUAL TABLE INDEX %d:%s",
  2876   2876                     pLoop->u.vtab.idxNum, pLoop->u.vtab.idxStr);
  2877   2877       }
         2878  +#endif
         2879  +#ifdef SQLITE_EXPLAIN_ESTIMATED_ROWS
         2880  +    if( pLoop->nOut>=10 ){
         2881  +      sqlite3XPrintf(&str, 0, " (~%llu rows)", sqlite3LogEstToInt(pLoop->nOut));
         2882  +    }else{
         2883  +      sqlite3StrAccumAppend(&str, " (~1 row)", 9);
         2884  +    }
  2878   2885   #endif
  2879   2886       zMsg = sqlite3StrAccumFinish(&str);
  2880   2887       sqlite3VdbeAddOp4(v, OP_Explain, iId, iLevel, iFrom, zMsg, P4_DYNAMIC);
  2881   2888     }
  2882   2889   }
  2883   2890   #else
  2884   2891   # define explainOneScan(u,v,w,x,y,z)