Commit Graph

20 Commits

Author SHA1 Message Date
drh
175b8f06f7 Remove support for STAT3. The sqlite_stat3 tables are ignored, if they
exist.  STAT4 continues to work as it always has, and as it is a superset of
STAT3 is the recommended replacement.

FossilOrigin-Name: 1e17ea2fd1df4ad49138c787c8fe3207dd0c25c93f9001d52a9b69f8c12e841c
2019-08-08 15:24:17 +00:00
drh
6ab91a7a7a Add the SQLITE_DEFAULT_DEFENSIVE compile-time option. Fix up test cases
so that they work with DEFENSIVE enabled.

FossilOrigin-Name: 3212733cb6d1a59516d67a86df7c7b1d2456a1b2e5d7080c26b0e87b2609c65d
2018-11-07 02:17:01 +00:00
drh
cedfecf90a Fix the ANALYZE command so that it will process tables whose names begin
with "sqlite" as long as they do not being with "sqlite_".

FossilOrigin-Name: 0249d9aecf69948d9343feef9291273beef5fc98aa9a8f95b1e35cc2ce8e6cbd
2018-03-23 12:59:10 +00:00
drh
22ecef5c20 When parsing the schema, ignore any SQL that does not begin with "CREATE".
FossilOrigin-Name: d3c00d61581c8ba6dce5618391432d3af8d324d4
2015-04-16 00:26:03 +00:00
dan
8ad169abb4 If ENABLE_STAT3 is defined but ENABLE_STAT4 is not, have ANALYZE create and populate the sqlite_stat3 table instead of sqlite_stat4.
FossilOrigin-Name: cca8bf4372ab7a0258aa5c9397818415c6cf0abf
2013-08-12 20:14:04 +00:00
dan
f52bb8d385 Begin adding experimental sqlite_stat4 table. This commit is buggy.
FossilOrigin-Name: 2beea303a1d609cd2ff252412c50b966b9e5e8f1
2013-08-03 20:24:58 +00:00
drh
4e50c5ec48 Further testing and bug fixing for sqlite_stat3. Added the Index.avgEq
field to index statistics.  Fixed several problems in the query planner
associated with stat3.

FossilOrigin-Name: 89b2f70884cad0abdf4c66cb64ecddb2820ded74
2011-08-13 19:35:19 +00:00
drh
a5ae4c330b Remove relevant elements from the sqlite_stat2 table when doing a DROP
INDEX or DROP TABLE.

FossilOrigin-Name: 3c8f97ae527e380bf2583c7cf8ceac9509f29bfe
2011-08-07 01:31:52 +00:00
drh
f6cf1ffb39 Do not generate sqlite_stat1 entries for empty tables when running
ANALYZE.  Ticket [83ea97620bd31016451]

FossilOrigin-Name: 3a27af5b3c688c651ba1fae261026ef77b7ff5e3
2011-03-30 14:54:05 +00:00
drh
155640552b Enhance the ANALYZE command so that it gathers statistics in the sqlite_stat1
table even for tables that are empty or have no indices.

FossilOrigin-Name: a7645d293801da64a7579737d0a8b48117af2e2c
2010-09-25 22:32:56 +00:00
dan
cb35460330 Changes to test scripts so that the "inmemory_journal" permutation works with [ef126e775a].
FossilOrigin-Name: f553c8ed04b4b2df8ff4929e0754e3ffd1d01ba4
2010-07-08 09:44:42 +00:00
drh
c456e57af7 Do not allow indexing of any table whose name begins with "sqlite_".
Ticket #3284.  Improve handling of databases with malformed schemas -
just in case somebody has actually indexed a system table. (CVS 5553)

FossilOrigin-Name: 0e1d8d14a153483e65bd0246d23db2b823a122d1
2008-08-11 18:44:58 +00:00
drh
4cfb22f798 Fix problems in test scripts. Add new test cases to improve test coverage. (CVS 5521)
FossilOrigin-Name: b65f493c7519e8a5ee632a395b57d45269741dda
2008-08-01 18:47:01 +00:00
danielk1977
006015d8e5 Remove entries from the sqlite_stat1 table whenever an index is dropped. Related to #3033. (CVS 4989)
FossilOrigin-Name: 349aab42c7896f04ecb6ca33f08a4c194051e837
2008-04-11 17:11:26 +00:00
drh
345331507f When a parse of the sqlite_master table fails, include the name of the
object being parsed as part of the error message. (CVS 4881)

FossilOrigin-Name: 57805b588f6b6d070918102a0ff096ade674279a
2008-03-19 13:03:33 +00:00
drh
0c35667b02 The shell does not output the sqlite_stat1 table on .dump or .schema.
The ANALYZE command now gathers statistics on tables that have only
a single index because this sometimes helps when reordering tables
in a join. (CVS 2686)

FossilOrigin-Name: 26565b8931419031f9a8dd3947e1e2bd23ccbff2
2005-09-10 22:40:53 +00:00
drh
1ec43c9a5a Fix ANALYZE so that it works even if the empty_result_callbacks pragma is
enabled. Ticket #1409. (CVS 2659)

FossilOrigin-Name: bfdaef1224d741deefe211e1e607bac4c80f2d89
2005-09-06 10:26:47 +00:00
drh
8b3d990b71 Bring testing coverage of the analyze.c file up to 100%. Bugs found and
fixed in the process. (CVS 2599)

FossilOrigin-Name: 2fe0ac4fa4d5911e266979021fa7e413d96c558d
2005-08-19 00:14:42 +00:00
drh
17a18f2f36 Store the total number of rows as part of the ANALYZE statistics. (CVS 2563)
FossilOrigin-Name: 868279c78e056d27b2d1bea81127fe689b2ce478
2005-07-23 14:52:12 +00:00
drh
e6e049694d Full-coverage testing and documentation for the ANALYZE command. The
results of analysis are still not loaded or used, however. (CVS 2561)

FossilOrigin-Name: bd7583a5d63412785a9c5de54d25b509da241605
2005-07-23 02:17:03 +00:00