Documentation Source Text

Check-in [6910bdfa2a]
Login

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

Overview
Comment:Add a note to help clarify that automatic indexes and internal indexes used to implement PRIMARY KEY and UNIQUE constraints are unrelated.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6910bdfa2a154fca4d098faefa07732d0dfd9b85
User & Date: drh 2015-11-02 14:10:43
Context
2015-11-02
18:36
Add the SQLITE_SOURCE_ID and sha1sum for 3.9.2. check-in: 0c15d84626 user: dan tags: trunk
14:10
Add a note to help clarify that automatic indexes and internal indexes used to implement PRIMARY KEY and UNIQUE constraints are unrelated. check-in: 6910bdfa2a user: drh tags: trunk
13:51
Add version 3.9.2 to the change log. check-in: 938ebc6962 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/optoverview.in.

1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
....
1202
1203
1204
1205
1206
1207
1208

1209
1210
1211
1212
1213
1214
1215









1216

1217
  Examples:
}
CODE {
  SELECT MIN(x) FROM table;
  SELECT MAX(x)+1 FROM table;
}

HEADING 1 {Automatic Indices} autoindex {automatic indexing} {Automatic indexing}

PARAGRAPH {
  ^(When no indices are available to aid the evaluation of a query, SQLite
  might create an automatic index that lasts only for the duration
  of a single SQL statement.)^
  Since the cost of constructing the automatic index is
  O(NlogN) (where N is the number of entries in the table) and the cost of
................................................................................
  the [automatic_index pragma].  Automatic indexing is turned on by
  default, but this can be changed so that automatic indexing is off
  by default using the [SQLITE_DEFAULT_AUTOMATIC_INDEX] compile-time option.
  The ability to create automatic indices can be completely disabled by
  compiling with the [SQLITE_OMIT_AUTOMATIC_INDEX] compile-time option.
}
PARAGRAPH {

  In SQLite version 3.8.0, an [SQLITE_WARNING_AUTOINDEX] message is sent
  to the [error log] every time a statement is prepared that uses an
  automatic index.  Application developers can and should use these warnings
  to identify the need for new persistent indices in the schema.
}
PARAGRAPH {
  Future releases of SQLite may disable automatic indices by default.









}

</tcl>







|







 







>
|





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

1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
....
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
  Examples:
}
CODE {
  SELECT MIN(x) FROM table;
  SELECT MAX(x)+1 FROM table;
}

HEADING 1 {Automatic Indexes} autoindex {automatic indexing} {Automatic indexing}

PARAGRAPH {
  ^(When no indices are available to aid the evaluation of a query, SQLite
  might create an automatic index that lasts only for the duration
  of a single SQL statement.)^
  Since the cost of constructing the automatic index is
  O(NlogN) (where N is the number of entries in the table) and the cost of
................................................................................
  the [automatic_index pragma].  Automatic indexing is turned on by
  default, but this can be changed so that automatic indexing is off
  by default using the [SQLITE_DEFAULT_AUTOMATIC_INDEX] compile-time option.
  The ability to create automatic indices can be completely disabled by
  compiling with the [SQLITE_OMIT_AUTOMATIC_INDEX] compile-time option.
}
PARAGRAPH {
  In SQLite version 3.8.0 and later, 
  an [SQLITE_WARNING_AUTOINDEX] message is sent
  to the [error log] every time a statement is prepared that uses an
  automatic index.  Application developers can and should use these warnings
  to identify the need for new persistent indices in the schema.
}
PARAGRAPH {
  Do not confuse automatic indexes with the [internal indexes] (having names
  like "sqlite_autoindex_<i>table</i>_<i>N</i>") that are sometimes
  created to implement a [PRIMARY KEY constraint] or [UNIQUE constraint].
  The automatic indexes described here exist only for the duration of a
  single query, are never persisted to disk, and are only visible to a
  single database connection.  Internal indexes are part of the implementation
  of PRIMARY KEY and UNIQUE constraints, are long-lasting and persisted
  to disk, and are visible to all database connections.  The term "autoindex"
  appears in the names of [internal indexes] for legacy reasons and does
  not indicate that internal indexes and automatic indexes are related.
}  

</tcl>