Documentation Source Text

Check-in [0bbad9c76b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Strengthen the disclaimers on the "speed.html" page and on the "PRAGMA stats" documentation.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0bbad9c76b08828b8a731275ded1ee9df8c57746
User & Date: drh 2014-04-01 15:02:43.505
Context
2014-04-01
17:19
Tweaks and maintenance on the various documentation pages. Improvements to wording. Updated hyperlinks. (check-in: c08c92bf98 user: drh tags: trunk)
15:02
Strengthen the disclaimers on the "speed.html" page and on the "PRAGMA stats" documentation. (check-in: 0bbad9c76b user: drh tags: trunk)
13:44
Fixes to the application file format document. (check-in: f3db82e049 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/pragma.in.
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
proc DebugDisclaimer {} {
  return {
    <p style='background-color: #f0e0ff;'>
    This pragma is intended for use when debugging SQLite itself.  It
    is only contained in the build when the [SQLITE_DEBUG] compile-time option
    is used.</p>
  }








}
# Legacy pragma - do not use these
proc LegacyPragma {namelist content} {
  Pragma $namelist [string map [list DISCLAIMER [LegacyDisclaimer]] $content]
  global PragmaLegacy
  foreach x $namelist {set PragmaLegacy($x) 1}
}
# Debugging pragmas
proc DebugPragma {namelist content} {
  Pragma $namelist [string map [list DISCLAIMER [DebugDisclaimer]] $content]
  global PragmaDebug
  foreach x $namelist {set PragmaDebug($x) 1}
}







</tcl>

<p>The PRAGMA statement is an SQL extension specific to SQLite and used to 
modify the operation of the SQLite library or to query the SQLite library for 
internal (non-table) data. The PRAGMA statement is issued using the same
interface as other SQLite commands (e.g. [SELECT], [INSERT]) but is







>
>
>
>
>
>
>
>













>
>
>
>
>
>







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
proc DebugDisclaimer {} {
  return {
    <p style='background-color: #f0e0ff;'>
    This pragma is intended for use when debugging SQLite itself.  It
    is only contained in the build when the [SQLITE_DEBUG] compile-time option
    is used.</p>
  }
}
proc TestDisclaimer {} {
  return {
    <p style='background-color: #f0e0ff;'>
    The intended use of this pragma is only for testing and validation of
    SQLite.  This pragma is subject to change without notice and is not
    recommended for use by application programs.</p>
  }
}
# Legacy pragma - do not use these
proc LegacyPragma {namelist content} {
  Pragma $namelist [string map [list DISCLAIMER [LegacyDisclaimer]] $content]
  global PragmaLegacy
  foreach x $namelist {set PragmaLegacy($x) 1}
}
# Debugging pragmas
proc DebugPragma {namelist content} {
  Pragma $namelist [string map [list DISCLAIMER [DebugDisclaimer]] $content]
  global PragmaDebug
  foreach x $namelist {set PragmaDebug($x) 1}
}
# Testing pragmas
proc TestPragma {namelist content} {
  Pragma $namelist [string map [list DISCLAIMER [TestDisclaimer]] $content]
  global PragmaTest
  foreach x $namelist {set PragmaTest($x) 1}
}

</tcl>

<p>The PRAGMA statement is an SQL extension specific to SQLite and used to 
modify the operation of the SQLite library or to query the SQLite library for 
internal (non-table) data. The PRAGMA statement is issued using the same
interface as other SQLite commands (e.g. [SELECT], [INSERT]) but is
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
    <p>This pragma returns one row for each index associated with the
    given table.)^
    ^Columns of the result set include the
    index name and a flag to indicate whether or not the index is UNIQUE.
    </p>
}

Pragma stats {
    <p>^(<b>PRAGMA stats;</b>)^ </p>
    <p>This pragma returns auxiliary information about tables and
    indices.  The returned information is used during testing to help
    verify that the query planner is operating correctly.  The format
    and meaning of this pragma will likely change from release
    to the next. Because of its volatility, the behavior and output
    format of this pragma are deliberately undocumented.  This pragma is
    intended for interactive, debugging, and testing use only.
    Applications should avoid using this pragma.</p>
}

Pragma page_count {
    <p>^(<b>PRAGMA page_count;</b></p>
    <p>Return the total number of pages in the database file.</p>)^
}








|






|
|
|







1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
    <p>This pragma returns one row for each index associated with the
    given table.)^
    ^Columns of the result set include the
    index name and a flag to indicate whether or not the index is UNIQUE.
    </p>
}

TestPragma stats {
    <p>^(<b>PRAGMA stats;</b>)^ </p>
    <p>This pragma returns auxiliary information about tables and
    indices.  The returned information is used during testing to help
    verify that the query planner is operating correctly.  The format
    and meaning of this pragma will likely change from release
    to the next. Because of its volatility, the behavior and output
    format of this pragma are deliberately undocumented.</p>

    DISCLAIMER
}

Pragma page_count {
    <p>^(<b>PRAGMA page_count;</b></p>
    <p>Return the total number of pages in the database file.</p>)^
}

1365
1366
1367
1368
1369
1370
1371


1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389


1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
for {set i 0} {$i<$nprag} {incr i} {
  set prag [lindex $allprag $i]
  set ref $PragmaRef($prag)
  if {[info exists PragmaLegacy($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><s>$prag</s></a>&sup1;\n"
  } elseif {[info exists PragmaDebug($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><i>$prag</i></a>&sup2;\n"


  } else {
    hd_puts "<li><a href=\"#pragma_$ref\">$prag</a>\n"
  }
  if {$i%$nrow==($nrow-1) && $i+1<$nprag} {
    hd_puts "</ul></td><td valign=\"top\" align=\"left\"><ul>\n"
  }
}
</tcl>
</ul></td></tr></table>
<p>Notes:
<ol>
<li>Pragmas whose names are marked through in the list above
are deprecated that are maintained for historical compatibility only.
Do not use the deprecated pragmas in new applications.
Remove deprecated pragmas
from existing applications at your earliest opportunity.</blockquote>
<li>These pragmas are used for debugging SQLite itself and
are only available when SQLite is compiled using [SQLITE_DEBUG].</ol></p>


<tcl>
foreach prag [lsort [array names PragmaBody]] {
  hd_fragment pragma_$prag
  foreach x $PragmaKeys($prag) {
    hd_keywords *$x "PRAGMA $x" "$x pragma"
  }
  hd_puts "<hr>"
  hd_resolve $PragmaBody($prag)
}
</tcl>
<hr>







>
>
















|
|
>
>











1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
for {set i 0} {$i<$nprag} {incr i} {
  set prag [lindex $allprag $i]
  set ref $PragmaRef($prag)
  if {[info exists PragmaLegacy($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><s>$prag</s></a>&sup1;\n"
  } elseif {[info exists PragmaDebug($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><i>$prag</i></a>&sup2;\n"
  } elseif {[info exists PragmaTest($prag)]} {
    hd_puts "<li><a href=\"#pragma_$ref\"><i>$prag</i></a>&sup3;\n"
  } else {
    hd_puts "<li><a href=\"#pragma_$ref\">$prag</a>\n"
  }
  if {$i%$nrow==($nrow-1) && $i+1<$nprag} {
    hd_puts "</ul></td><td valign=\"top\" align=\"left\"><ul>\n"
  }
}
</tcl>
</ul></td></tr></table>
<p>Notes:
<ol>
<li>Pragmas whose names are marked through in the list above
are deprecated that are maintained for historical compatibility only.
Do not use the deprecated pragmas in new applications.
Remove deprecated pragmas
from existing applications at your earliest opportunity.</blockquote>
<li>These pragmas are used for debugging SQLite and
are only available when SQLite is compiled using [SQLITE_DEBUG].
<li>These pragmas are used for testing SQLite and are not recommended
for use in application programs.</ol></p>
<tcl>
foreach prag [lsort [array names PragmaBody]] {
  hd_fragment pragma_$prag
  foreach x $PragmaKeys($prag) {
    hd_keywords *$x "PRAGMA $x" "$x pragma"
  }
  hd_puts "<hr>"
  hd_resolve $PragmaBody($prag)
}
</tcl>
<hr>
Changes to pages/speed.in.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<title>SQLite Database Speed Comparison</title>

<h2>Database Speed Comparison</h2>

<font color="red"><b>
Note:  This document is very very old.  It describes a speed comparison between
archaic versions of SQLite, MySQL and PostgreSQL.  
<p>
The numbers here are old enough to be nearly meaningless.  Until it is
updated, use this document only as proof that SQLite is not a
sluggard.
</b></font>

<h3>Executive Summary</h3>

<p>A series of tests were run to measure the relative performance of
SQLite 2.7.6, PostgreSQL 7.1.3, and MySQL 3.23.41.
The following are general








|
<
|







1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
<title>SQLite Database Speed Comparison</title>

<h2>Database Speed Comparison</h2>

<font color="red"><b>
Note:  This document is very very old.  It describes a speed comparison between
archaic versions of SQLite, MySQL and PostgreSQL.  
<p>
The numbers here have become meaningless.  This page has been retained only

as an historical artifact.  
</b></font>

<h3>Executive Summary</h3>

<p>A series of tests were run to measure the relative performance of
SQLite 2.7.6, PostgreSQL 7.1.3, and MySQL 3.23.41.
The following are general