Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Readability improvements to the file format documentation. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3b1bef87684702cbd5779c866b8da9c5 |
User & Date: | drh 2017-08-31 00:54:35.587 |
Context
2017-09-01
| ||
20:53 | Updates to the size and performance chart (check-in: 5e4cd244d1 user: drh tags: trunk) | |
2017-08-31
| ||
00:54 | Readability improvements to the file format documentation. (check-in: 3b1bef8768 user: drh tags: trunk) | |
2017-08-30
| ||
04:50 | Update the speed-and-size spreadsheet. (check-in: 402ce78c69 user: drh tags: trunk) | |
Changes
Changes to pages/fileformat2.in.
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + + | <title>Database File Format</title> <alt-title>On-Disk Format</alt-title> <tcl>hd_keywords {file format} {second edition file format document}</tcl> <table_of_contents> <p>This document describes and defines the on-disk database file |
︙ | |||
40 41 42 43 44 45 46 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + + | SQLite database is a single 512-byte page. The maximum size database would be 2147483646 pages at 65536 bytes per page or 140,737,488,224,256 bytes (about 140 terabytes). Usually SQLite will hit the maximum file size limit of the underlying filesystem or disk hardware long before it hits its own internal size limit.</p> <p>In common use, SQLite databases tend to range in size from a few kilobytes |
︙ | |||
151 152 153 154 155 156 157 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + + | (in hex): 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00. This byte sequence corresponds to the UTF-8 string "SQLite format 3" including the nul terminator character at the end.</p> <h3>Page Size</h3> <p>The two-byte value beginning at offset 16 determines the page size of |
︙ | |||
238 239 240 241 242 243 244 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | - - + + | size if it is available but fall back to the actual file size if the in-header database size is not valid.</p> <p>^The in-header database size is only considered to be valid if it is non-zero and if the 4-byte [change counter] at offset 24 exactly matches the 4-byte [version-valid-for number] at offset 92. ^(The in-header database size is always valid |
︙ | |||
397 398 399 400 401 402 403 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | - - - - + + + + + | implementations may choose to read or write bytes on the lock-byte page according to the needs and proclivities of the underlying system. The unix and win32 [VFS] implementations that come built into SQLite do not write to the lock-byte page, but third-party VFS implementations for other operating systems might.</p> |
︙ | |||
428 429 430 431 432 433 434 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + + | ^(Call the second integer on a freelist trunk page L. If L is greater than zero then integers with array indexes between 2 and L+1 inclusive contain page numbers for freelist leaf pages.)^</p> <p>Freelist leaf pages contain no information. ^SQLite avoids reading or writing freelist leaf pages in order to reduce disk I/O.</p> |
︙ | |||
1359 1360 1361 1362 1363 1364 1365 | 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | + - + | WITHOUT ROWID table.)^ <tcl>hd_fragment stat2tab {sqlite_stat2}</tcl> <h3>The sqlite_stat2 table</h3> <p>The sqlite_stat2 is only created and is only used if SQLite is compiled with SQLITE_ENABLE_STAT2 and if the SQLite version number is between 3.6.18 ([dateof:3.6.18]) and 3.7.8 ([dateof:3.7.8]). |
︙ | |||
1397 1398 1399 1400 1401 1402 1403 | 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 | - + - - + + | sqlite_stat2 table, if is exists, is simply ignored. <tcl>hd_fragment stat3tab {sqlite_stat3} SQLITE_STAT3</tcl> <h3>The sqlite_stat3 table</h3> <p>The sqlite_stat3 is only used if SQLite is compiled with [SQLITE_ENABLE_STAT3] or [SQLITE_ENABLE_STAT4] |
︙ | |||
1441 1442 1443 1444 1445 1446 1447 | 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 | + - + | sample S1 must have a smaller rowid than sample S2.)^ <tcl>hd_fragment stat4tab {sqlite_stat4} SQLITE_STAT4</tcl> <h3>The sqlite_stat4 table</h3> <p>The sqlite_stat4 is only created and is only used if SQLite is compiled with [SQLITE_ENABLE_STAT4] and if the SQLite version number is 3.8.1 ([dateof:3.8.1]) or greater. |
︙ |
Changes to pages/formatchng.in.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - + + | <title>File Format Changes in SQLite</title> <h2>File Format Changes in SQLite</h2> <p> The [file format|underlying file format] for SQLite databases does not |
︙ | |||
33 34 35 36 37 38 39 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | - + - + - + - + - + - + - + - + - + - + | <tr> <th>Version Change</th> <th>Approx. Date</th> <th>Description Of File Format Change</th> </tr> <tr> <td valign="top">1.0.32 to 2.0.0</td> |