Documentation Source Text

Check-in [183931a121]
Login

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

Overview
Comment:Documentation for SQLITE_ENABLE_SORTER_REFERENCES.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 183931a12198f95b0808cc1bc77c2b261003005825c187b3eac0aec2be621f5b
User & Date: drh 2018-05-04 16:43:30.723
Context
2018-05-08
13:35
Mention the cell-overwrite optimization on the change log. (check-in: d324d1a30e user: drh tags: trunk)
2018-05-04
16:43
Documentation for SQLITE_ENABLE_SORTER_REFERENCES. (check-in: 183931a121 user: drh tags: trunk)
05:03
Update the speed-and-size spreadsheet. (check-in: 0fdc011d0b user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/compile.in.
1020
1021
1022
1023
1024
1025
1026
































1027
1028
1029
1030
1031
1032
1033
  This option causes SQLite to include support for the
  [rtree | R*Tree index extension].
}

COMPILE_OPTION {SQLITE_ENABLE_SESSION} {
  This option enables the [session extension].
}

































COMPILE_OPTION {SQLITE_ENABLE_STMT_SCANSTATUS} {
  This option enables the [sqlite3_stmt_scanstatus()] interface.  The
  [sqlite3_stmt_scanstatus()] interface is normally omitted from the build
  because it imposes a small performance penalty, even on statements that
  do not use the feature.
}







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







1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
  This option causes SQLite to include support for the
  [rtree | R*Tree index extension].
}

COMPILE_OPTION {SQLITE_ENABLE_SESSION} {
  This option enables the [session extension].
}

COMPILE_OPTION {SQLITE_ENABLE_SORTER_REFERENCES} {
  This option activates an optimization that reduces the memory required
  by the sorter at the cost of doing additional B-tree lookups after
  the sort has occurred.
  <p>
  The default sorting procedure is to gather all information that will
  ultimately be output into a "record" and pass that complete record
  to the sorter.  But in some cases, for example if some of the output
  columns consists of large BLOB values, the size of the each record
  can be large, which means that the sorter has to either use more memory,
  and/or write more content to temporary storage.
  <p>
  When SQLITE_ENABLE_SORTER_PREFERENCES is enabled, the records passed to
  the sorter often contain only a [ROWID] value.  Such records are much
  smaller.  This means the sorter has much less "payload" to deal with and
  can run faster.  After sorting has occurred, the ROWID is used to look up 
  the output column values in the original table.  That requires another
  search into the table, and could potentially result in a slowdown.  Or,
  it might be a performance win, depending on how large the values are.
  <p>
  Even when the SQLITE_ENABLE_SORTER_PREFERENCES compile-time option is on,
  sorter references are still disabled by default.  To use sorter references,
  the application must set a sorter reference size threshold using the
  [sqlite3_config]([SQLITE_CONFIG_SORTERREF_SIZE]) interface at start-time.
  <p>
  Because the SQLite developers do not know whether the 
  SQLITE_ENABLE_SORTER_PERFERENCES option will help or hurt performance,
  it is disabled by default at this time (2018-05-04).  It might be enabled
  by default in some future release, depending on what is learned about its
  inpact on performance.
}

COMPILE_OPTION {SQLITE_ENABLE_STMT_SCANSTATUS} {
  This option enables the [sqlite3_stmt_scanstatus()] interface.  The
  [sqlite3_stmt_scanstatus()] interface is normally omitted from the build
  because it imposes a small performance penalty, even on statements that
  do not use the feature.
}