Documentation Source Text

Check-in [6405a81c7b]
Login

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

Overview
Comment:Document the effect of the "REINDEX;" statement.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6405a81c7b04c4261860cda606fcd157e9798b7d
User & Date: dan 2010-09-24 18:59:32
Context
2010-09-24
19:00
Update the REINDEX syntax diagram to allow for no arguments. check-in: f55ccb05aa user: drh tags: trunk
18:59
Document the effect of the "REINDEX;" statement. check-in: 6405a81c7b user: dan tags: trunk
17:58
Fixes and testability improvements to lang_vacuum.html. check-in: 91efaa0fc0 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/lang.in.

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
....
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629



2630
2631
2632
2633
2634
2635
2636
    {{ON CONFLICT clause} conflict}
    {{CREATE VIEW} createview}
    {{DROP VIEW} dropview}
    {{CREATE TRIGGER} createtrigger}
    {{DROP TRIGGER} droptrigger}
    {{ATTACH DATABASE} attach}
    {{DETACH DATABASE} detach}
    {REINDEX reindex}
    {{ALTER TABLE} altertable}
    {{ANALYZE} analyze}
    {{INDEXED BY} indexedby}
    {{aggregate functions} aggfunc aggfunc}
    {{core functions} corefunc corefunc}
    {{date and time functions} datefunc datefunc}
    {keywords keywords {SQL keywords}}
................................................................................
BubbleDiagram reindex-stmt 1
</tcl>

<p>^The REINDEX command is used to delete and recreate indices from scratch.
This is useful when the definition of a collation sequence has changed.
</p>

<p>^In the first form, all indices in all attached databases that use the
named collation sequence are recreated. ^(In the second form, if 
<i>&#91;database-name.&#93;table/index-name</i> identifies a table,
then all indices
associated with the table are rebuilt.)^ ^If an index is identified, then only
this specific index is deleted and recreated.
</p>

<p>^If no <i>database-name</i> is specified and there exists both a table or
index and a collation sequence of the specified name, then indices associated
with the collation sequence only are reconstructed. This ambiguity may be
dispelled by always specifying a <i>database-name</i> when reindexing a
specific table or index.




<tcl>
###############################################################################
Section REPLACE replace REPLACE

</tcl>








|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
....
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
    {{ON CONFLICT clause} conflict}
    {{CREATE VIEW} createview}
    {{DROP VIEW} dropview}
    {{CREATE TRIGGER} createtrigger}
    {{DROP TRIGGER} droptrigger}
    {{ATTACH DATABASE} attach}
    {{DETACH DATABASE} detach}
      {REINDEX reindex}
    {{ALTER TABLE} altertable}
    {{ANALYZE} analyze}
    {{INDEXED BY} indexedby}
    {{aggregate functions} aggfunc aggfunc}
    {{core functions} corefunc corefunc}
    {{date and time functions} datefunc datefunc}
    {keywords keywords {SQL keywords}}
................................................................................
BubbleDiagram reindex-stmt 1
</tcl>

<p>^The REINDEX command is used to delete and recreate indices from scratch.
This is useful when the definition of a collation sequence has changed.
</p>

<p>^If the REINDEX keyword is not followed by a collation-sequence or database 
object identifier, then all indices in all attached databases are rebuilt.

<p>^If the REINDEX keyword is followed by a collation-sequence name, then
all indices in all attached databases that use the named collation sequences
are recreated. 

<p>^Or, if the argument attached to the REINDEX identifies a specific 
database table, then all indices attached to the database table are rebuilt. 
^If it identifies a specific database index, then just that index is recreated.

<p>^If no <i>database-name</i> is specified and there exists both a table or
index and a collation sequence of the specified name, SQLite interprets
this as a request to rebuild the indices that use the named collation sequence.
This ambiguity in the syntax may be avoided by always specifying a
<i>database-name</i> when reindexing a specific table or index.

<tcl>
###############################################################################
Section REPLACE replace REPLACE

</tcl>