The Next-Generation Query Planner
(queryplanner-ng.html)
5. Checklist For Avoiding Or Fixing Query Planner Problems
... When creating a
new database that you expect to accumulate a lot of data, you can run
the command "ANALYZE sqlite_schema" to create the SQLITE_STAT1 table,
then prepopulate the sqlite_stat1 table (using ordinary INSERT statements)
with content that describes a ...
|
C API: Database Connection Configuration Options
(c3ref/c_dbconfig_defensive.html)
SQLITE_DBCONFIG_MAINDBNAME, SQLITE_DBCONFIG_LOOKASIDE, SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION ...
... SQLITE_DBCONFIG_DQS_DDL
The SQLITE_DBCONFIG_DQS option activates or deactivates
the legacy double-quoted string literal misfeature for DDL statements,
such as CREATE TABLE and CREATE INDEX. The
default value of this setting is determined by the -DSQLITE_DQS
compile-time option.
SQLITE_DBCONFIG_TRUSTED_SCHEMA
The ...
|
Defense Against The Dark Arts
(security.html)
1.1. Untrusted SQL Inputs
... Note that SQLite uses its built-in printf() internally to help it
format the sql column in the sqlite_schema table. For that reason,
no table, index, view, or trigger definition can be much larger than the
precision limit. You can ...
|
C API: Status Parameters for prepared statements
(c3ref/c_stmtstatus_counter.html)
SQLITE_STMTSTATUS_FULLSCAN_STEP, SQLITE_STMTSTATUS_SORT, SQLITE_STMTSTATUS_AUTOINDEX, SQLITE_STMTSTATUS_VM_STEP, SQLITE_STMTSTATUS_REPREPARE, SQLITE_STMTSTATUS_RUN ...
... SQLITE_STMTSTATUS_FULLSCAN_STEP
This is the number of times that SQLite has stepped forward in
a table as part of a full table scan. Large numbers for this counter
may indicate opportunities for performance improvement through
careful use of indices.
SQLITE_STMTSTATUS_SORT
This ...
|
The C language interface to SQLite Version 2
(c_interface.html)
... But rows that are
deleted because of a DROP TABLE are not counted.
SQLite implements the command "DELETE FROM table" (without
a WHERE clause) by dropping the table then recreating it.
This is much faster than deleting the elements of ...
|
C API: Virtual Table Indexing Information
(c3ref/index_info.html)
struct sqlite3_index_info, struct sqlite3_index_constraint, struct sqlite3_index_orderby ...
... The colUsed field indicates which columns of the virtual table may be
required by the current scan. Virtual table columns are numbered from
zero in the order in which they appear within the CREATE TABLE statement
passed to sqlite3_declare_vtab(). For ...
|
What If OpenDocument Used SQLite?
(affcase1.html)
... The table schema
might look something like this:
CREATE TABLE slide(
pageNumber INTEGER, -- The slide page number
slideContent TEXT -- Slide content as XML or JSON
);
CREATE INDEX slide_pgnum ON slide(pageNumber); -- Optional
The content of each slide could still be ...
|
VACUUM
(lang_vacuum.html)
... Frequent inserts, updates, and deletes can cause the database file
to become fragmented - where data for a single table or index is scattered
around the database file. Running VACUUM ensures that each table and
index is largely stored contiguously within ...
|
NULL Handling in SQLite
(nulls.html)
... Thanks.
--
-- If you have to change anything to get this script to run with your database
-- engine, please send your revised script together with your results.
--
-- Create a test table with data
create table t1(a int, b int, c ...
|
NUL Characters In Strings
(nulinstr.html)
2. Unexpected Behavior
... CREATE TABLE t1(
a INTEGER PRIMARY KEY,
b TEXT
);
INSERT INTO t1(a,b) VALUES(1, 'abc'||char(0)||'xyz');
SELECT a, b, length(b) FROM t1;
The SELECT statement above shows output of:
1,'abc',3
(Through this document ...
|
Page generated by FTS5 in about 144.23 ms.