Documentation Source Text

Check-in [c3875b77fa]
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 | branch-3.31
Files: files | file ages | folders
SHA3-256: c3875b77fa111717f4be82e5eb839943f7048944ce300a03baa2191c17dc0385
User & Date: drh 2020-05-21 19:16:59
Context
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
01:27
Fix the INSERT syntax diagram so that it is not possible to go from DEFAULT VALUES to the upsert-clause. check-in: 8b88f8f240 user: drh tags: branch-3.31
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>