Commit Graph

48 Commits

Author SHA1 Message Date
larrybr
99f50dd219 Close the db as sqlite3_analyzer exits. (See [forum:af384c2315d9718a|forum post, "sqlite3_analyzer not closing WAL-mode db cleanly" ].)
FossilOrigin-Name: 94ceac98845e31249b656dcdb8a58f456b9212dc83968ea333852a66d72a0dae
2024-09-13 16:10:04 +00:00
drh
99623a83aa Update sqlite3_analyzer to report on the number of WITHOUT ROWID tables and
to provide separate aggregate statistics for WITHOUT and WITH ROWID tables.

FossilOrigin-Name: 4152894433c3a292d983b1c196664a0c46e406eccd7e644a64fa443fdb204825
2024-06-18 12:19:13 +00:00
drh
c84a0b2195 Bug fix in sqlite3_analyzer: for databases larger than 1GiB, take into
account the lock-byte page when calculating the number of freelist pages.

FossilOrigin-Name: 26a909cdd32afee0f15968ca6f611eb259373b2a2195d0b3d47cfba103f1e6d6
2023-10-14 10:54:37 +00:00
drh
480f5e3e6e Change references to the schema table in sqlite3_analyzer to the new
SQLITE_SCHEMA name.

FossilOrigin-Name: 3beb77d6a792d07ca605ec8e5402b8a305860cba4044fcafeed00b9fa862fa16
2021-07-15 16:39:42 +00:00
drh
1e32bed3c1 Further refactoring of the schema table name.
FossilOrigin-Name: 9536fa0ae0c1ae6e2e98d2fa11e5acda7f3c9b8ca5061b6f7f8cae63a11d936b
2020-06-19 13:33:53 +00:00
drh
542bd6521e Fix an off-by-one error in the "calculated" page count output from the
sqlite3_analyzer utility for databases that are more than 1GB in size.

FossilOrigin-Name: 8789368b91fb5b7477bdba3a953412fc3839b4894443b65186f7b8f79f6369c9
2020-04-22 13:49:25 +00:00
drh
d59fde3da5 Update the built procedures for the sqlite3_analyzer utility to allow it
to be linked with an external sqlite3.o library.  Automatically detect a
missing dbstat extension and report the compile-time error.

FossilOrigin-Name: bb39744f4b2b25c10d293e85db7579e2a99c639fdab45e93d1de75952b68b2de
2017-10-31 14:56:44 +00:00
drh
f217f3b68c Fix typo and improve the wording of the description of "Metadata" in the
output of the sqlite3_analyzer tool.

FossilOrigin-Name: ca1ff70780e07e5ee930fe7972db02e887d9b085d8ab78e878d7f966b6d684d4
2017-06-15 16:45:23 +00:00
drh
c74d962a1f Enhance the sqlite3_analyzer.exe utility so that it computes and shows the
number of bytes of metadata on btree pages and per table and index entry.

FossilOrigin-Name: 43ad41efa9e1fdd79a9804197a227491236495f14ed56c656224d6ce181703c1
2017-06-15 00:52:03 +00:00
drh
432697467f Add to sqlite3_analyzer command-line options --version and --tclsh, and also
the undocumented --debug option.

FossilOrigin-Name: e87d02d289a2016ea3ee074e914b07a8ac22b21f
2016-10-12 18:26:26 +00:00
dan
d49c6930b1 Fix a bug in sqlite_analyzer causing it report (slightly) incorrect values for the number of entries in indexes or WITHOUT ROWID tables.
FossilOrigin-Name: dc37750d4e87d0c529785adceeebd838b8f8591d
2016-05-06 15:16:02 +00:00
drh
310a8d6668 Fix the help message that sqlite3_analyzer.exe generates for invalid
arguments.

FossilOrigin-Name: 33a14e7be1004abca7a30f675459138d7f8d72b1
2015-09-08 17:31:30 +00:00
drh
dc6ef98742 Improve the usage comment on sqlite3_analyzer: show the available switches.
FossilOrigin-Name: 783f78e39795b2c491c342558ef59f1fc32c2858
2015-08-04 19:06:50 +00:00
drh
8fb6c4389d In the sqlite3_analyzer.exe utility, show the depth of each btree and report
the average fanout of indexes and WITHOUT ROWID tables.

FossilOrigin-Name: cd997770013e923ac3fa34b1546b97681923c8b1
2015-08-04 14:18:10 +00:00
drh
d13b231923 Test cases for sqlite3_analyzer and sqldiff. Fix a problem with
sqlite3_analyzer related to the renaming of the initialization routine.

FossilOrigin-Name: 85a4a46c3bb9fd8124969c9e975086c795113b7e
2015-05-11 17:46:14 +00:00
dan
9fab5ed01f Fix WITHOUT ROWID table handing in sqlite3_analyzer.
FossilOrigin-Name: 937e0fe7008c0f76b6a584180df9a9457166a0b1
2015-02-09 17:46:11 +00:00
drh
71b4ea83e0 Import the sqlite3_analyzer fixes from trunk.
FossilOrigin-Name: ac711459ff243e787ea5e9c01720dff75a5eda9b
2013-11-02 11:43:05 +00:00
drh
a46417151a A pair of sqlite3_analyzer bug fixes: (1) quote strings in the SQL at the end
of the output. (2) Fix test_stat.c so that it no longer misses some overflow
pages on internal index pages.

FossilOrigin-Name: 42a11e7464ab1d97d603c7409f10710ad4f1f542
2013-11-02 11:34:58 +00:00
drh
7913e41f6d Fix sqlite3_analyzer so that it works with WITHOUT ROWID tables.
Fix index generation for secondary indices that include fields from
the PRIMARY KEY.

FossilOrigin-Name: f9769d701c65770f4b8488f541c59e508393e6c2
2013-11-01 20:30:36 +00:00
drh
2f312ee65f Updates to the sqlite3_analyzer utility: Change the names of some labels,
especially change "Fragmentation" to "Non-sequential pages".  Revise the
computation of non-sequential pages so that it ignores itercalated non-leaf
pages (overflow and index pages).

FossilOrigin-Name: 3e5c7771fa91d8ae1e495432329b87af87b1ebc6
2013-09-28 12:40:55 +00:00
drh
cc0713057f Enhance the sqlite3_analyzer tool to give reports on the sizes of individual
indices.

FossilOrigin-Name: 3b4096cc8a3b4517cdf49dcfe1f33279a5eb8efb
2013-07-17 18:12:15 +00:00
drh
453a312091 Add support for URI filenames in sqlite3_analyzer.
FossilOrigin-Name: 6dc987d32ba4d09b811ef281cdae09be17ac936c
2012-10-10 10:52:46 +00:00
drh
370026242a Update sqlite3_analyzer to correctly find all database files when the
multiplexor is being used.

FossilOrigin-Name: 1bfc30cb0fdc4b9def989eea2d78f6ac851633fa
2012-04-06 00:09:27 +00:00
drh
36c0632127 Enhance sqlite3_analyzer so that it is able to deal with multiplexed databases
that have 8+3 filenames.

FossilOrigin-Name: e5169f9a5b7e20b8adaf6ebb7868a64e44fd7321
2011-10-10 16:06:35 +00:00
drh
a624fd5038 Add the --pageinfo and --stats options to the sqlite3_analyzer utility.
FossilOrigin-Name: baa80c7bc31900decae0d8e6090b30fcde377492
2011-10-05 19:46:03 +00:00
drh
b770894ec7 Update the sqlite3_analyzer utility program to provide more details about
the compression performance of ZIPVFS database files.

FossilOrigin-Name: fa5ed53296d45a5f963d20fb361555c432e0f31b
2011-10-05 18:18:13 +00:00
drh
4c9f129d60 Enhance the stat VFS to report out the total size of all pages used by
a table, even if the ZIPVFS compression backend is in play.  Update
the sqlite3_analyzer logic to use these new outputs.

FossilOrigin-Name: 19b8eaaf70db82d401d33beb7fd36045d5e8326f
2011-09-28 00:50:14 +00:00
drh
f08f3843b7 Changes to sqlite3_analyzer to try to avoid integer overflow problems
when linking against older versions of TCL.

FossilOrigin-Name: 8c846311a0cd510bbf9361213bb60764e9b797aa
2011-09-27 13:40:26 +00:00
dan
64b41c7132 Changes to the analyzer script to make it work with zipvfs databases.
FossilOrigin-Name: d82cffab6acafcf9d91fea4ac47cad73f6f09775
2011-09-26 19:32:47 +00:00
drh
565621a57e Minor tweaks to the TCL code for sqlite3_analyzer.
FossilOrigin-Name: 3a261f383f11d839d3a23d454b4422298bef9c88
2011-09-21 20:10:42 +00:00
mistachkin
ac43e1a6a5 Cleanup/fix error handling when no arguments are supplied to the SQLite analyzer.
FossilOrigin-Name: 3fc566ac5dfce314ee414a3fb79daeeed6d0f179
2011-09-15 00:40:11 +00:00
drh
4515a45b8c Backslash escaping is not working right in tostr.awk on the latest ubuntu.
The easiest fix is to simply not use any backslashes in the spaceanal.tcl
script.

FossilOrigin-Name: df550066657cb41bad34ac8e722b8148ab7eabfb
2011-08-31 17:46:50 +00:00
dan
599e9d21bb Changes so that the space-analyzer script works with 3.7.0.
FossilOrigin-Name: 86159cb3f00a380dc55be3affb01c433618f0683
2010-07-12 08:39:37 +00:00
shane
ea5989276a For Windows VFS, modified xGetLastError() to call FormatMessage()
with the FORMAT_MESSAGE_IGNORE_INSERTS option.  Additionally updated
to ensure strings are returned as UTF8.  Ticket 39c85e8a4e.

FossilOrigin-Name: 761396f8cb79be34853ba698a65af54874c3c10e
2009-10-21 02:00:47 +00:00
dan
03c7b99988 Add documentation comment for new experimental API sqlite3_reoptimize().
FossilOrigin-Name: c48f8ffedc30841aa4994eb925d09c2ee97a864d
2009-10-17 08:26:29 +00:00
drh
0349688fbc Fix a bug in the TCL code for sqlite3_analyzer. (CVS 4590)
FossilOrigin-Name: 7c2cf4542852a81daf29a930ab103c52bb678326
2007-12-04 13:41:51 +00:00
drh
fc6e0c985a Explanation of the "fragmentation" line is added to the help message at
the end of the output of sqlite3_analyzer. (CVS 3636)

FossilOrigin-Name: 31e5073c58f43b84d26218d70e6f6558c406803e
2007-02-13 01:41:52 +00:00
drh
0a0b77b0d2 Additional fixes to the new fragmentation feature of sqlite3_analyzer. (CVS 3635)
FossilOrigin-Name: 82aed271a4a69e3dad6013b83cc7d492b7fed164
2007-02-13 01:38:31 +00:00
drh
50c6706305 Changes to support fragmentation analysis in sqlite3_analyzer. (CVS 3634)
FossilOrigin-Name: bd6bc3b8f06919000fb082087dff7bbd335d07e9
2007-02-10 19:22:35 +00:00
drh
35c12830d1 Fix sqlite3_analyzer so that it works when compiled against Tcl8.5. (CVS 3458)
FossilOrigin-Name: e774adce8e461a70ead9474cd64cb05c2d633eb9
2006-10-03 12:08:54 +00:00
drh
f316c8c08b Fix sqlite3_analyzer so that it works on databases containing virtual tables. (CVS 3457)
FossilOrigin-Name: 47c8567fcb6b184ca13fcb67f80d261205c66fc8
2006-10-03 12:04:11 +00:00
drh
6a714ded6c Use 64-bit integers in sqlite3_analyzer. Ticket #1666. (CVS 3059)
FossilOrigin-Name: 8b3068aca7b28d2b6c326f632bb9fe9b4940792d
2006-02-09 02:41:07 +00:00
drh
a7531c699a Sqlite3_analyzer reports an error if it runs into trouble. (CVS 3021)
FossilOrigin-Name: 388b9262281308d0a9dd16e2fb3df3425c2a491a
2006-01-24 02:19:53 +00:00
drh
faf60c7a0d Fix minor display bugs in sqlite3_analyzer. (CVS 2431)
FossilOrigin-Name: d89aaba5b0fe6b2787531cadd7806ab5a3fdeb98
2005-03-29 13:18:16 +00:00
danielk1977
24c9253c43 Space analyzer: Format integer results as integers. Also fix the calculation of average-fanout. (CVS 2304)
FossilOrigin-Name: 52e473b94694cd0991257427d57515ecef93c780
2005-02-01 10:36:40 +00:00
danielk1977
0ba87cb85d Refactor the space-analysis script for readability. (CVS 2081)
FossilOrigin-Name: 63f2ee22e20ed7e520fd9230acc5c6db43b69d13
2004-11-09 07:42:11 +00:00
danielk1977
16254450f4 Update the space-analyzer tool to support auto-vacuum databases. (CVS 2080)
FossilOrigin-Name: 1cb8086612c7dec170da0910cf0cbe4e48c417f8
2004-11-08 16:15:09 +00:00
drh
3e27c02625 First cut at a analysis tool for version 3.0 databases. (CVS 1862)
FossilOrigin-Name: 7c7f698b2eda7b1b34f5ca7fe104145d8bbd8f56
2004-07-23 00:01:38 +00:00