Documentation Source Text

Check-in [8da1a575d7]
Login

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

Overview
Comment:More documentation tweaks. Add two new entries to the "limits" page.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8da1a575d77dc455b00b33798a9447683f6406ff
User & Date: drh 2013-04-27 18:31:34.502
Context
2013-04-30
11:51
Fix typos in the compile.html document. (check-in: 32b04c8243 user: drh tags: trunk)
2013-04-27
18:31
More documentation tweaks. Add two new entries to the "limits" page. (check-in: 8da1a575d7 user: drh tags: trunk)
12:01
Updates to documentation, especially the C API introduction. (check-in: f0275a9b47 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/about.in.
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
architectures.  These features make SQLite a popular choice as
an <a href="whentouse.html#appfileformat">Application File Format</a>.
Think of SQLite not as a replacement for 
[http://www.oracle.com/database/index.html|Oracle] but
as a replacement for [http://man.he.net/man3/fopen|fopen()]</p>

<p>SQLite is a compact library.
With all features enabled, the [library size] can be less than 350KiB,
depending on the target platform and compiler optimization settings.
(64-bit code is larger.  And some compiler optimizations
such as aggressive function inlining and loop unrolling can cause the
object code to be much larger.)  If optional features are omitted, the
size of the SQLite library can be reduced below 300KiB.  SQLite can also
be made to run in minimal stack space (4KiB) and
very little heap (100KiB), making SQLite a popular database engine 







|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
architectures.  These features make SQLite a popular choice as
an <a href="whentouse.html#appfileformat">Application File Format</a>.
Think of SQLite not as a replacement for 
[http://www.oracle.com/database/index.html|Oracle] but
as a replacement for [http://man.he.net/man3/fopen|fopen()]</p>

<p>SQLite is a compact library.
With all features enabled, the [library size] can be less than 500KiB,
depending on the target platform and compiler optimization settings.
(64-bit code is larger.  And some compiler optimizations
such as aggressive function inlining and loop unrolling can cause the
object code to be much larger.)  If optional features are omitted, the
size of the SQLite library can be reduced below 300KiB.  SQLite can also
be made to run in minimal stack space (4KiB) and
very little heap (100KiB), making SQLite a popular database engine 
Changes to pages/amalgamation.in.
42
43
44
45
46
47
48
49
50
is that the additional optimizations often take the form of 
function inlining which tends to make the size of the resulting
binary image larger.</p>

<p>The amalgamation and
the sqlite3.h header file are available on
the <a href="download.html">download page</a> as a file 
named sqlite-amalgamation-X_X_X.zip 
where the X's are replaced by the appropriate version number.</p>







|
|
42
43
44
45
46
47
48
49
50
is that the additional optimizations often take the form of 
function inlining which tends to make the size of the resulting
binary image larger.</p>

<p>The amalgamation and
the sqlite3.h header file are available on
the <a href="download.html">download page</a> as a file 
named sqlite-amalgamation-X.zip
where the X is replaced by the appropriate version number.</p>
Changes to pages/features.in.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<li>Implements most of SQL92.
    (<a href="omitted.html">Features not supported</a>)</li>
<li>A complete database is stored in a 
    <a href="onefile.html">single cross-platform disk file</a>.</li>
<li>Supports terabyte-sized databases and gigabyte-sized strings
    and blobs.  (See <a href="limits.html">limits.html</a>.)
<li>Small code [footprint]: 
    less than 400KiB fully configured or less
    than 250KiB with optional features omitted.</li>
<li><a href="speed.html">Faster</a> than popular client/server database
    engines for most common operations.</li>
<li>Simple, easy to use <a href="c3ref/intro.html">API</a>.</li>
<li>Written in ANSI-C.  <a href="tclsqlite.html">TCL bindings</a> included.
    Bindings for dozens of other languages 
    <a href="http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers">
    available separately.</a></li>
<li>Well-commented source code with
    [test coverage |100% branch test coverage].</li>
<li>Available as a 
    <a href="amalgamation.html">single ANSI-C source-code file</a> 
    that you can easily drop into another project.
<li><a href="selfcontained.html">Self-contained</a>:
    no external dependencies.</li>







|
|




|
<
<







11
12
13
14
15
16
17
18
19
20
21
22
23
24


25
26
27
28
29
30
31
<li>Implements most of SQL92.
    (<a href="omitted.html">Features not supported</a>)</li>
<li>A complete database is stored in a 
    <a href="onefile.html">single cross-platform disk file</a>.</li>
<li>Supports terabyte-sized databases and gigabyte-sized strings
    and blobs.  (See <a href="limits.html">limits.html</a>.)
<li>Small code [footprint]: 
    less than 500KiB fully configured or much less
    with optional features omitted.</li>
<li><a href="speed.html">Faster</a> than popular client/server database
    engines for most common operations.</li>
<li>Simple, easy to use <a href="c3ref/intro.html">API</a>.</li>
<li>Written in ANSI-C.  <a href="tclsqlite.html">TCL bindings</a> included.
    Bindings for dozens of other languages available separately.</li>


<li>Well-commented source code with
    [test coverage |100% branch test coverage].</li>
<li>Available as a 
    <a href="amalgamation.html">single ANSI-C source-code file</a> 
    that you can easily drop into another project.
<li><a href="selfcontained.html">Self-contained</a>:
    no external dependencies.</li>
Changes to pages/limits.in.
396
397
398
399
400
401
402

































403
404
405
The theoretical maximum number of rows in a table is
2<sup><small>64</small></sup> (18446744073709551616 or about 1.8e+19).
This limit is unreachable since the maximum database size of 140 terabytes
will be reached first.  A 140 terabytes database can hold no more than
approximately 1e+13 rows, and then only if there are no indices and if
each row contains very little data.
}


































</tcl>
</ol>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
The theoretical maximum number of rows in a table is
2<sup><small>64</small></sup> (18446744073709551616 or about 1.8e+19).
This limit is unreachable since the maximum database size of 140 terabytes
will be reached first.  A 140 terabytes database can hold no more than
approximately 1e+13 rows, and then only if there are no indices and if
each row contains very little data.
}

limititem {Maximum Database Size} {} {
<p>
Every database consists of one or more "pages".  Within a single database,
every page is the same size, but different database can have page sizes
that are powers of two between 512 and 65536, inclusive.  The maximum
size of a database file is 2147483646 pages.  At the maximum page size
of 65536 bytes, this translates into a maximum database size of 
approximately 1.4e+14 bytes (140 terabytes, or 128 tebibytes, or
140,000 gigabytes or 128,000 gibibytes).
<p>
This particular upper bound is untested since the developers do not 
have access to hardware capable of reaching this limit.  However, tests
do verify that SQLite behaves correctly and sanely when a database 
reaches the maximum file size of the underlying filesystem (which is
usually much less than the maximum theoretical database size) and when
a database is unable to grow due to disk space exhaustion.
}

limititem {Maximum Number Of Tables In A Schema} {} {
<p>
Each table and index requires at least one page in the database file.
An "index" in the previous sentence means an index created explicitly
using a [CREATE INDEX] statement or implicit indices created by UNIQUE
and PRIMARY KEY constraints.  Since the maximum number of pages in a
database file is 2147483646 (a little over 2 billion) this is also then
an upper bound on the number of tables and indices in a schema.
<p>
Whenever a database is opened, the entire schema is scanned and parsed
and a parse tree for the schema is held in memory.  That means that
database connection startup time and initial memory usage
is proportional to the size of the schema.
}

</tcl>
</ol>