Documentation Source Text

Check-in [f246e9b589]
Login

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

Overview
Comment:Fix typo in the query planner documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f246e9b5897fc75ab462e4d64ce163b86ec691a4b5dcaeeb73fd8efa6e395c77
User & Date: drh 2020-05-21 19:16:40
Context
2020-05-22
11:43
Update testing metrics. check-in: f09dcc9b65 user: drh tags: trunk
2020-05-21
19:16
Fix typo in the query planner documentation. Leaf check-in: c3875b77fa user: drh tags: branch-3.31
19:16
Fix typo in the query planner documentation. check-in: f246e9b589 user: drh tags: trunk
2020-05-20
17:42
Documentation updates based on code review. check-in: 0bdeed702c user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/queryplanner.in.

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<tcl>code {
SELECT price FROM fruitsforsale WHERE rowid=4;
}</tcl>

<p>
Since the information is stored in the table in rowid order, SQLite
can find the correct row using a binary search.
If the table contains N element, the time required to look up the
desired row is proportional to logN rather than being proportional
to N as in a full table scan.  If the table contains 10 million elements,
that means the query will be on the order of N/logN or about 1 million
times faster.
</p>

<tcl>figure 3 #fig3 rowidlu.gif {Lookup By Rowid}</tcl>







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<tcl>code {
SELECT price FROM fruitsforsale WHERE rowid=4;
}</tcl>

<p>
Since the information is stored in the table in rowid order, SQLite
can find the correct row using a binary search.
If the table contains N elements, the time required to look up the
desired row is proportional to logN rather than being proportional
to N as in a full table scan.  If the table contains 10 million elements,
that means the query will be on the order of N/logN or about 1 million
times faster.
</p>

<tcl>figure 3 #fig3 rowidlu.gif {Lookup By Rowid}</tcl>