Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
lang_analyze.html

Index Summary Markup Original


R-51997-44583-38299-48413-31745-25105-55087-52146 tcl slt th3 src

Canonical usage: syntax/analyze-stmt.html

th3/req1/analyze01.test:10

/* IMP: R-51997-44583 */
# EVIDENCE-OF: R-51997-44583 -- syntax diagram analyze-stmt

R-08470-40933-39231-45429-29526-36251-38185-62772 tcl slt th3 src

The ANALYZE command gathers statistics about tables and indices and stores the collected information in internal tables of the database where the query optimizer can access the information and use it to help make better query planning choices.

th3/req1/analyze01.test:38

/* IMP: R-08470-40933 */
# EVIDENCE-OF: R-08470-40933 The ANALYZE command gathers statistics
# about tables and indices and stores the collected information in
# internal tables of the database where the query optimizer can access
# the information and use it to help make better query planning choices.

R-31035-48105-55236-17512-32062-12366-10110-52557 tcl slt th3 src

If no arguments are given, all attached databases are analyzed.

th3/req1/analyze01.test:116

/* IMP: R-31035-48105 */
# EVIDENCE-OF: R-31035-48105 If no arguments are given, all attached
# databases are analyzed.

R-07454-30568-63832-24254-44508-63507-10248-49928 tcl slt th3 src

If a schema name is given as the argument, then all tables and indices in that one database are analyzed.

th3/req1/analyze01.test:146

/* IMP: R-07454-30568 */
# EVIDENCE-OF: R-07454-30568 If a schema name is given as the argument,
# then all tables and indices in that one database are analyzed.

R-49846-38160-32658-53011-14500-27650-55616-46897 tcl slt th3 src

If the argument is a table name, then only that table and the indices associated with that table are analyzed.

th3/req1/analyze01.test:169

/* IMP: R-49846-38160 */
# EVIDENCE-OF: R-49846-38160 If the argument is a table name, then only
# that table and the indices associated with that table are analyzed.

R-56841-45734-29539-09781-39505-27779-01471-37796 tcl slt th3 src

If the argument is an index name, then only that one index is analyzed.

th3/req1/analyze01.test:202

/* IMP: R-56841-45734 */
# EVIDENCE-OF: R-56841-45734 If the argument is an index name, then only
# that one index is analyzed.

R-17503-44008-12544-16508-15108-35473-45615-30294 tcl slt th3 src

The default implementation stores all statistics in a single table named "sqlite_stat1".

th3/req1/analyze01.test:64

/* IMP: R-17503-44008 */
# EVIDENCE-OF: R-17503-44008 The default implementation stores all
# statistics in a single table named "sqlite_stat1".

R-45504-07424-56372-48110-52162-38596-27659-06802 tcl slt th3 src

If SQLite is compiled with the SQLITE_ENABLE_STAT3 option and without the SQLITE_ENABLE_STAT4 option, then additional histogram data is collected and stored in sqlite_stat3.

th3/req1/analyze01.test:72

/* IMP: R-45504-07424 */
# EVIDENCE-OF: R-45504-07424 If SQLite is compiled with the
# SQLITE_ENABLE_STAT3 option and without the SQLITE_ENABLE_STAT4 option,
# then additional histogram data is collected and stored in
# sqlite_stat3.

R-05461-33397-24167-58750-38066-50926-47850-55199 tcl slt th3 src

If SQLite is compiled with the SQLITE_ENABLE_STAT4 option, then additional histogram data is collected and stored in sqlite_stat4.

th3/req1/analyze01.test:82

/* IMP: R-05461-33397 */
# EVIDENCE-OF: R-05461-33397 If SQLite is compiled with the
# SQLITE_ENABLE_STAT4 option, then additional histogram data is
# collected and stored in sqlite_stat4.

R-48126-27717-31293-47858-22865-09722-12158-06374 tcl slt th3 src

The content of the statistics tables can be queried using SELECT and can be changed using the DELETE, INSERT, and UPDATE commands.

th3/req1/analyze01.test:228

/* IMP: R-48126-27717 */
# EVIDENCE-OF: R-48126-27717 The content of the statistics tables can be
# queried using SELECT and can be changed using the DELETE, INSERT, and
# UPDATE commands.

R-54781-23071-09729-07904-20031-27691-48494-39961 tcl slt th3 src

The DROP TABLE command works on statistics tables as of SQLite version 3.7.9.

th3/req1/analyze01.test:232

/* IMP: R-54781-23071 */
# EVIDENCE-OF: R-54781-23071 The DROP TABLE command works on statistics
# tables as of SQLite version 3.7.9.

R-28880-18896-60065-00895-16000-25645-24475-60986 tcl slt th3 src

The ALTER TABLE command does not work on statistics tables.

th3/req1/analyze01.test:225

/* IMP: R-28880-18896 */
# EVIDENCE-OF: R-28880-18896 The ALTER TABLE command does not work on
# statistics tables.

R-00576-15510-24475-53838-43505-45493-44918-44548 tcl slt th3 src

Statistics gathered by ANALYZE are not automatically updated as the content of the database changes.

th3/req1/analyze01.test:315

/* IMP: R-00576-15510 */
# EVIDENCE-OF: R-00576-15510 Statistics gathered by ANALYZE are not
# automatically updated as the content of the database changes.

R-29517-30691-07524-03121-42038-48163-15213-35798 tcl slt th3 src

Hence, when an application changes the statistics tables directly, SQLite will not immediately notice the changes.

th3/req1/analyze01.test:332

/* IMP: R-29517-30691 */
# EVIDENCE-OF: R-29517-30691 Hence, when an application changes the
# statistics tables directly, SQLite will not immediately notice the
# changes.

R-08385-08814-16494-59705-02420-23410-27891-51332 tcl slt th3 src

An application can force the query planner to reread the statistics tables by running ANALYZE sqlite_master.

th3/req1/analyze01.test:336

/* IMP: R-08385-08814 */
# EVIDENCE-OF: R-08385-08814 An application can force the query planner
# to reread the statistics tables by running ANALYZE sqlite_master.