Commit Graph

19 Commits

Author SHA1 Message Date
dan
3410e550dc Make the SQLITE_DBCONFIG_STMT_SCANSTATUS option on by default.
FossilOrigin-Name: 5a09191186bc03b374e0c0d029e1a15208c6b845bc2f5f5f9f6a8a882809d9f3
2023-03-03 21:17:12 +00:00
dan
06382de2a3 Change the name of SQLITE_DBCONFIG_STMT_SCANSTATS to SQLITE_DBCONFIG_STMT_SCANSTATUS.
FossilOrigin-Name: a63e4a150b505fc309fac847131009ee9965eb1b798ebcb202ec8b52f9189240
2023-02-28 20:04:01 +00:00
dan
45163fc45e Add an sqlite3_db_config() option - SQLITE_DBCONFIG_STMT_SCANSTATS - for enabling and disabling the collection of sqlite3_stmt_scanstats() statistics in SQLITE_ENABLE_STMT_SCANSTATUS builds. Collection of statistics is disabled by default.
FossilOrigin-Name: 0f5579bef27b84ee855065cfe87703c51e1f9773906a9e0d4e4dafc90bd0e553
2023-02-28 19:39:59 +00:00
dan
2288ecbb9c Fix problems with test scripts preventing them from running with SQLITE_DEFAULT_MEMSTATUS=0 builds. Or builds without SQLITE_ENABLE_STAT4.
FossilOrigin-Name: c0fbc89ed26b6eb361c1a05e2fb0d78d101fe2daf2947bbe5e0e58e0c2a779a2
2023-02-06 11:02:31 +00:00
dan
231ff4b027 Enhance the sqlite3_stmt_scanstatus() API and add sqlite3_stmt_scanstatus_v2(). For creation of easier to read query performance reports.
FossilOrigin-Name: 55800833645739efeddcacef464c623931cb6aeb43f4219b4e4faf473c25c8bb
2022-12-02 20:32:22 +00:00
drh
46bee2aa12 Tweaks to test/scanstatus.test to account for the new EQP format.
FossilOrigin-Name: 2eb28afd01f43143a9c0cd6cea68f3095f993952d54ee06b781514a7754490cd
2021-03-23 15:39:02 +00:00
drh
8210233c7b Revise tests cases to align with the new EXPLAIN QUERY PLAN output.
FossilOrigin-Name: 50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
2021-03-20 15:11:29 +00:00
dan
69e224f88a Reformat the white-space in a few test cases so that the tests work with Tcl 8.6.9.
FossilOrigin-Name: 29d02bf2fa9ecacbcc3e862ca70382f5875da8c1dc7fd27366190045fcc42b15
2019-02-26 19:16:49 +00:00
drh
b3f0276b9e Fix test cases so that they work with the new EXPLAIN QUERY PLAN output
format.  Only some of the cases have been fixed.  This is an incremental
check-in.

FossilOrigin-Name: 5f0e803e33aa557865d5fc830d9202d628de9a94c9757058ca48f1a560702cd3
2018-05-02 18:00:17 +00:00
drh
1df6470d35 When compiling with SQLITE_TEST, extra options are available on the
"DB version" command for controlling the internal state of the SqliteDb
object, for testing purposes.

FossilOrigin-Name: bf86478d9c6b899d6441e80cf9d17b58731e5d354e31b11f0d58a798f6fab896
2017-10-13 15:56:26 +00:00
drh
99bbcc8287 Undo some unhelpful changes to skip-scan scoring that were added
by the check-in [9e2b2681] that improved scoring of index scan.

FossilOrigin-Name: c7d51934a4f30d096bb79fc509fc9dd0df5d89a4
2016-07-29 01:32:36 +00:00
drh
e604ec0be0 Add test cases and fix a comment.
FossilOrigin-Name: 50f8ea37fb9647c4a9da2c269a4d6f54b10ce96b
2016-07-27 19:20:58 +00:00
drh
7a1bca7e74 Deploy heuristics (well-commented) to better estimate how much unindexed terms
in the WHERE clause filter the number of output rows from a single table.

FossilOrigin-Name: 221659945c3f78d3b6789bfe8fdeb8d3ee1fa038
2014-11-22 18:50:44 +00:00
drh
518140ed04 Change the SQLITE_SCANSTAT_EST parameter so that it returns a double for
the estimated number of output rows per loop, rather than a 64-bit integer.
Revise the output format for the ".scanstats on" in the shell to make use
of this new capability.

FossilOrigin-Name: f9684000665ae7ef6f89c3773612b8286b8f545a
2014-11-06 03:55:10 +00:00
dan
e2f771b047 Add further tests. Fixes so that compilation without ENABLE_STMT_SCANSTATUS works.
FossilOrigin-Name: a2303c719222f1effb51acc6b37930561148c00c
2014-11-03 15:33:17 +00:00
dan
037b5324bd Remove unused variable from struct WhereInfo. Add some explanatory comments to new code.
FossilOrigin-Name: f5313e0c680d9baebefb1cf50ddadedd4418a334
2014-11-03 11:25:32 +00:00
dan
6f9702ed4d If SQLITE_ENABLE_STMT_SCANSTATUS is defined, record the number of times each VDBE opcode is executed. Derive the values returned by sqlite3_stmt_scanstatus() from these records on demand.
FossilOrigin-Name: 9ea37422a8cc2fce51bb10508e5e90f40fd4b511
2014-11-01 20:38:06 +00:00
dan
89e71646df Minor fixes and documentation improvements for sqlite3_stmt_scanstatus().
FossilOrigin-Name: 8d8cc9608d30bb65fffcfe488e904411cbbc7f41
2014-11-01 18:08:04 +00:00
dan
04489b6dce Add the experimental sqlite3_stmt_scanstatus() API.
FossilOrigin-Name: 6a9bab34aeb6a01b612211a28c140de60a3e883c
2014-10-31 20:11:32 +00:00