Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.
|Comment:||Corrects to comments on the STAT4 implementation.|
|Downloads:||Tarball | ZIP archive | SQL archive|
|Timelines:||family | ancestors | descendants | both | trunk|
|Files:||files | file ages | folders|
|User & Date:||drh 2013-10-14 14:21:59|
|14:30||Update the foreign_key_check pragma so that when a parent table is undefined it is treated as an empty table. check-in: 208b259a user: drh tags: trunk|
|14:21||Corrects to comments on the STAT4 implementation. check-in: e06f74d3 user: drh tags: trunk|
|13:21||Make subroutines sampleCopy() and valueFromExpr() have file scope. check-in: 1660efbe user: drh tags: trunk|
Changes to src/analyze.c.
27 27 ** is between 3.6.18 and 3.7.8, inclusive, and unless SQLite is compiled 28 28 ** with SQLITE_ENABLE_STAT2. The sqlite_stat2 table is deprecated. 29 29 ** The sqlite_stat2 table is superseded by sqlite_stat3, which is only 30 30 ** created and used by SQLite versions 3.7.9 and later and with 31 31 ** SQLITE_ENABLE_STAT3 defined. The functionality of sqlite_stat3 32 32 ** is a superset of sqlite_stat2. The sqlite_stat4 is an enhanced 33 33 ** version of sqlite_stat3 and is only available when compiled with 34 -** SQLITE_ENABLE_STAT4 and in SQLite versions 3.8.0 and later. It is 34 +** SQLITE_ENABLE_STAT4 and in SQLite versions 3.8.1 and later. It is 35 35 ** not possible to enable both STAT3 and STAT4 at the same time. If they 36 36 ** are both enabled, then STAT4 takes precedence. 37 37 ** 38 38 ** For most applications, sqlite_stat1 provides all the statisics required 39 39 ** for the query planner to make good choices. 40 40 ** 41 41 ** Format of sqlite_stat1: ................................................................................ 103 103 ** that indexed columns are compared against in the WHERE clauses of 104 104 ** queries. 105 105 ** 106 106 ** The sqlite_stat4 table contains multiple entries for each index. 107 107 ** The idx column names the index and the tbl column is the table of the 108 108 ** index. If the idx and tbl columns are the same, then the sample is 109 109 ** of the INTEGER PRIMARY KEY. The sample column is a blob which is the 110 -** binary encoding of a key from the index, with the trailing rowid 111 -** omitted. The nEq column is a list of integers. The first integer 112 -** is the approximate number of entries in the index whose left-most 113 -** column exactly matches the left-most column of the sample. The second 114 -** integer in nEq is the approximate number of entries in the index where 115 -** the first two columns match the first two columns of the sample. 110 +** binary encoding of a key from the index. The nEq column is a 111 +** list of integers. The first integer is the approximate number 112 +** of entries in the index whose left-most column exactly matches 113 +** the left-most column of the sample. The second integer in nEq 114 +** is the approximate number of entries in the index where the 115 +** first two columns match the first two columns of the sample. 116 116 ** And so forth. nLt is another list of integers that show the approximate 117 117 ** number of entries that are strictly less than the sample. The first 118 118 ** integer in nLt contains the number of entries in the index where the 119 119 ** left-most column is less than the left-most column of the sample. 120 120 ** The K-th integer in the nLt entry is the number of index entries 121 121 ** where the first K columns are less than the first K columns of the 122 122 ** sample. The nDLt column is like nLt except that it contains the