]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Increase the default minimum PMA size for multi-threaded sorting from 10x
authordrh <drh@noemail.net>
Tue, 9 Dec 2014 14:42:49 +0000 (14:42 +0000)
committerdrh <drh@noemail.net>
Tue, 9 Dec 2014 14:42:49 +0000 (14:42 +0000)
the page size to 250x the page size.  Provide the SQLITE_SORTER_PMASZ
compile-time option to change this default.

FossilOrigin-Name: b05340fe3cd5f1676a55023228dc8d1a92de5936

manifest
manifest.uuid
src/vdbesort.c

index 32ad7f85e56a3ccaad08532369a5ddf7c8da060d..0542dbf99d0f64dff955a9f73926c973f727a6e2 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\scompiler\swarning.
-D 2014-12-09T04:26:56.984
+C Increase\sthe\sdefault\sminimum\sPMA\ssize\sfor\smulti-threaded\ssorting\sfrom\s10x\nthe\spage\ssize\sto\s250x\sthe\spage\ssize.\s\sProvide\sthe\sSQLITE_SORTER_PMASZ\ncompile-time\soption\sto\schange\sthis\sdefault.
+D 2014-12-09T14:42:49.215
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 6c4f961fa91d0b4fa121946a19f9e5eac2f2f809
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -298,7 +298,7 @@ F src/vdbeapi.c 07acb615d1e4170e71fc1b0d087f3c53a1ad8e83
 F src/vdbeaux.c 6f7f39c3fcf0f5923758df8561bb5d843908a553
 F src/vdbeblob.c 4af4bfb71f6df7778397b4a0ebc1879793276778
 F src/vdbemem.c 31d8eabb0cd78bfeab4e5124c7363c3e9e54db9f
-F src/vdbesort.c 42c166f7ca78cb643c7f4e4bdfa83c59d363d1a6
+F src/vdbesort.c db015e20a77b25eca4d1e125815f4998a3ca1354
 F src/vdbetrace.c 7e4222955e07dd707a2f360c0eb73452be1cb010
 F src/vtab.c c08ec66f45919eaa726bf88aa53eb08379d607f9
 F src/wal.c 847692349eb6e1fb8543dbc97e69ddbfa4cc7ea7
@@ -1226,7 +1226,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P d6832aa24c8d93b4532a651b86605bd0a0d0aa78
-R 61f069fccea470b5ca359a3a5c90ead2
-U mistachkin
-Z b0538f03992f2ac4a5c753853d936f4f
+P e97b7a8b4df784d148fefb9554da0f511e351d9f
+R bd26f6a52391b4ad1637a19c173d9967
+U drh
+Z c16d1b57c275f469d491c230a3c4e6f8
index f722851738b0612327b14204cf76ae8affb53883..b381d7ac7e468cd518dd605255c283271749710e 100644 (file)
@@ -1 +1 @@
-e97b7a8b4df784d148fefb9554da0f511e351d9f
\ No newline at end of file
+b05340fe3cd5f1676a55023228dc8d1a92de5936
\ No newline at end of file
index 7c736adefe359c7a910a078d9b9f94bbce246971..29ec40c0d153aed2d93fd2e1c3d063deedd9bcb6 100644 (file)
@@ -450,7 +450,9 @@ struct SorterRecord {
 
 /* The minimum PMA size is set to this value multiplied by the database
 ** page size in bytes.  */
-#define SORTER_MIN_WORKING 10
+#ifndef SQLITE_SORTER_PMASZ
+# define SQLITE_SORTER_PMASZ 250
+#endif
 
 /* Maximum number of PMAs that a single MergeEngine can merge */
 #define SORTER_MAX_MERGE_COUNT 16
@@ -849,9 +851,9 @@ int sqlite3VdbeSorterInit(
     }
 
     if( !sqlite3TempInMemory(db) ){
-      pSorter->mnPmaSize = SORTER_MIN_WORKING * pgsz;
+      pSorter->mnPmaSize = SQLITE_SORTER_PMASZ * pgsz;
       mxCache = db->aDb[0].pSchema->cache_size;
-      if( mxCache<SORTER_MIN_WORKING ) mxCache = SORTER_MIN_WORKING;
+      if( mxCache<SQLITE_SORTER_PMASZ ) mxCache = SQLITE_SORTER_PMASZ;
       pSorter->mxPmaSize = MIN((i64)mxCache*pgsz, SQLITE_MAX_MXPMASIZE);
 
       /* EVIDENCE-OF: R-26747-61719 When the application provides any amount of