Documentation Source Text

Check-in [72fd502948]
Login

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

Overview
Comment:Clarify .expert option noted in https://sqlite.org/forum/forumpost/745f7e63b3
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 72fd502948968ef0235d04f3388b9c9c04d32df513de19894747f41c3180b4ab
User & Date: larrybr 2022-01-22 17:02:31
Context
2022-01-22
21:05
Take dot-command arg-parsing clarification (check-in: 978ca626bd user: larrybr tags: trunk)
18:30
Clarify .expert option noted in https://sqlite.org/forum/forumpost/745f7e63b3 (check-in: 7e61bb09e2 user: larrybr tags: branch-3.37)
17:02
Clarify .expert option noted in https://sqlite.org/forum/forumpost/745f7e63b3 (check-in: 72fd502948 user: larrybr tags: trunk)
2022-01-21
19:26
Add requirements marks to newer parts of the date/time documentation. (check-in: deb6d14033 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/cli.in.

1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
outputs the plan that SQLite will use for the query given the existing 
indexes.

<p>The ".expert" command accepts the following options:

<table striped=1>
<tr><th> Option <th> Purpose
<tr><td> --verbose 
    <td> If present, output a more verbose report for each query analyzed.
<tr><td> --sample&nbsp;PERCENT 
    <td> By default, the ".expert" command recommends indexes based on the
         query and database schema alone. This is similar to the way the
         [SQLite query planner] selects indexes for queries if the user has not
         run the [ANALYZE] command on the database to generate data
         distribution statistics. 
         <div style="margin-top:1ex">
         If this option is passed a non-zero argument, the ".expert" command
         generates similar data distribution statistics for all indexes
         considered based on PERCENT percent of the rows currently stored in
         each database table. For databases with unusual data distributions,
         this may lead to better index recommendations, particularly if the
         application intends to run ANALYZE.







|

|
|
|
|
|
|







1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
outputs the plan that SQLite will use for the query given the existing 
indexes.

<p>The ".expert" command accepts the following options:

<table striped=1>
<tr><th> Option <th> Purpose
<tr><td> &#8209;&#8209;verbose
    <td> If present, output a more verbose report for each query analyzed.
<tr><td> &#8209;&#8209;sample&nbsp;PERCENT 
    <td> This parameter defaults to 0, causing the ".expert" command to
         recommend indexes based on the query and database schema alone.
         This is similar to the way the [SQLite query planner] selects
         indexes for queries if the user has not run the [ANALYZE] command
         on the database to generate data distribution statistics. 
         <div style="margin-top:1ex">
         If this option is passed a non-zero argument, the ".expert" command
         generates similar data distribution statistics for all indexes
         considered based on PERCENT percent of the rows currently stored in
         each database table. For databases with unusual data distributions,
         this may lead to better index recommendations, particularly if the
         application intends to run ANALYZE.