dan
38fdead890
Fix a problem with OOM handling in the sorter code.
...
FossilOrigin-Name: 59cd5229e2b5be5272cf57c7e7d09e97d16a5425
2014-04-01 10:19:02 +00:00
dan
b3f56fdb69
Add the SQLITE_MAX_WORKER_THREADS compile time option. And the SQLITE_CONFIG_WORKER_THREADS sqlite3_config() switch.
...
FossilOrigin-Name: 2774710df8cd2bfaca49888c69f1b01c0ddadf9a
2014-03-31 19:57:34 +00:00
dan
853c4a7621
Fix a broken assert() in vdbesort.c.
...
FossilOrigin-Name: 18d1b402f2dbe78f1a1113bb356b710e348365ef
2014-03-29 10:01:58 +00:00
dan
e7c84cc7e3
Fix a problem in vdbesort.c causing spurious SQLITE_NOMEM errors when using memsys3 or memsys5.
...
FossilOrigin-Name: a683c05f6250389e84b980b16559e162ba1a27c2
2014-03-29 09:34:45 +00:00
dan
ff9fce4d60
Add the optimization to avoid some unnecessary calls to sqlite3VdbeRecordUnpack() added to the trunk by [707ea170b3].
...
FossilOrigin-Name: fc4d04e6b039ea5aeb47739e38c5926e63a4b01b
2014-03-29 06:27:35 +00:00
dan
2f17001521
Merge latest changes from orderby-planning branch.
...
FossilOrigin-Name: 4c7fb5423430f3b936befaa7c309f8e1968ee7d8
2014-03-28 19:18:16 +00:00
dan
6971952c65
Instead of allocating a single large buffer at the beginning of each sort operation, start with a small buffer and extend it using realloc() as required.
...
FossilOrigin-Name: 81987c8ceb64f051528a6ca42673821d9ab7c0ff
2014-03-27 19:25:02 +00:00
dan
face087212
Use xFetch() to access temporary files in vdbesort.c. Use a single large allocation instead of many small allocations when accumulating records in vdbesort.c. This is an interim commit - it allocates a buffer the size of the page-cache every time data is sorted.
...
FossilOrigin-Name: f4ac1bf28c4ba395ccab8f1c9df72614a61095a7
2014-03-27 17:23:41 +00:00
dan
ab1dcc1a4b
Fix a problem in the code added by [707ea170b3] causing vdbesort.c to sort unstably.
...
FossilOrigin-Name: d3e640afe611b6ae0b7f2cff5b00900d7e4d5ee3
2014-03-25 17:07:48 +00:00
drh
3c863634ef
Enable four sorting threads by default in the command-line shell.
...
FossilOrigin-Name: 1cab83577c814feb35b4fb91af0d52a9751d99bc
2014-03-25 14:12:16 +00:00
drh
5c2b314222
Merge all fixes and enhancements from trunk.
...
FossilOrigin-Name: b415dfb6cb0df0c69992ca2bb700c15664f158e6
2014-03-25 13:17:41 +00:00
dan
dd23c6bfb4
Omit the sequence value from sorter records used by GROUP BY queries that cannot use an index.
...
FossilOrigin-Name: 3f90abddc31ac20739778c235a834c33f7057997
2014-03-24 20:19:07 +00:00
drh
f9f1bdb0c8
Merge trunk fixes for "x IN (?)" handling.
...
FossilOrigin-Name: eca35871c34374ca9189c7c9b6d490ac3c30357f
2014-03-20 20:56:49 +00:00
drh
4ef7efad5e
Fix harmless compiler warnings.
...
FossilOrigin-Name: b1435f26b07b2208cfcca557f96342a5bd0d5328
2014-03-20 15:14:08 +00:00
drh
db1cc09c72
Merge the vdbesort.c optimization from trunk.
...
FossilOrigin-Name: e4bfffb988283c077778c60696be0d285ad66c3c
2014-03-19 23:42:51 +00:00
dan
344510e62b
Avoid some unnecessary calls to sqlite3VdbeRecordUnpack() that were being made when merging data from two or more temp files together in vdbesort.c
...
FossilOrigin-Name: 707ea170b3e26965b7e3982f7554d122d130b9a6
2014-03-19 20:01:25 +00:00
drh
65ea12cb4a
Make it possible for block-sort to use the OP_SorterOpen sorter in addition
...
to a generic OP_OpenEphemeral.
FossilOrigin-Name: 7ce2daafd39a117041bfdd0a7132e2764fe7a74b
2014-03-19 17:41:36 +00:00
dan
f87684189d
Add an experimental multi-threaded capability to vdbesorter.c.
...
FossilOrigin-Name: ff0b5c851ba7d04d1836d7c6a3222713e7d8d357
2014-03-17 15:43:05 +00:00
dan
3833e934d3
Remove the vdbeRecordCompareLargeHeader function. Fix some other details.
...
FossilOrigin-Name: 3861e853105cb8da344c7eebd2e455622b26395e
2014-03-01 19:44:56 +00:00
dan
3b9330f83c
Further changes to sqlite3VdbeRecordCompare().
...
FossilOrigin-Name: 570893740067a7caa952f259fa078cdf67017d71
2014-02-27 20:44:18 +00:00
dan
1fed5dab0d
Attempt to speed up sqlite3VdbeRecordCompare() by various means. This code is in an interim state.
...
FossilOrigin-Name: 85206e0bbac29adab52bef795f6d1479f2ae2c0e
2014-02-25 21:01:25 +00:00
drh
1153c7b25d
Size KeyInfo objects so that IdxInserts always compare the correct number of
...
fields.
FossilOrigin-Name: 302a81390f039fc23eeb8510e95b9d9fa0b41edd
2013-11-01 22:02:56 +00:00
drh
f7b5496e8e
Many small harmless comment changes. Removal of obsolete comments and
...
fixing misspelled words. No changes to code.
FossilOrigin-Name: a0d5cc9315dc6e9ef7dee4c3dfabf4e562d64376
2013-05-28 12:11:54 +00:00
drh
dba0cb2351
Remove the SQLITE_OMIT_MERGE_SORT compile-time option and its related code.
...
The merge sorter is now a required component.
FossilOrigin-Name: 8b44d6fb159e85267095e846cded2764c3bcb895
2013-03-24 22:56:49 +00:00
dan
d4e97e8aad
Fix a 32-bit integer overflow problem that could cause an error in a CREATE INDEX statement that writes more than 16GB of data.
...
FossilOrigin-Name: e24ba5bee4424e99d0859ef652164ae1397a2378
2012-10-26 19:22:45 +00:00
drh
8b64b3977e
Silence three harmless compiler warnings in vdbesort.c.
...
FossilOrigin-Name: a5431c86df442c6e6dfaeae8e8aa62b56d204e97
2012-08-14 19:04:27 +00:00
drh
07f547923e
Simplifications to the sorter to support full-coverage testing.
...
FossilOrigin-Name: de804f4c90f02ca98991da185ed5e28bdd319e92
2012-08-07 22:53:01 +00:00
dan
09ac7ec544
Merge the sorter-coalesce-writes branch into the trunk. This improves CREATE INDEX performance on some platforms.
...
FossilOrigin-Name: e1e9cb08b011e67b767091e42225f22ec862fa64
2012-08-06 19:28:20 +00:00
dan
243be2b0e1
Fix a crash that could follow an OOM condition.
...
FossilOrigin-Name: 2e5741f774248abc678b50711c43e38ca30c9091
2012-08-06 19:12:17 +00:00
dan
8c5287ec73
Update sorter-coalesce-writes branch with latest trunk changes.
...
FossilOrigin-Name: 214f8cda1727e0eee51605be487d4cf4f2dfb6db
2012-08-06 18:10:09 +00:00
dan
9d0c0ea601
Update some comments in vdbesort.c.
...
FossilOrigin-Name: f4b3fded231231ef15bde98d2a996b4e16415d4c
2012-07-26 09:21:14 +00:00
drh
c041c16ce1
Mark parameters to sorter interfaces as const where appropriate.
...
FossilOrigin-Name: d8da26f1f43610ac83af2a5d0e170be5abaf7aaa
2012-07-24 19:46:38 +00:00
dan
407fae09ee
Fix an edge case in vdbesort.c.
...
FossilOrigin-Name: 4ba266fc534f390267180eca8d68b8d5f0b7f832
2012-07-23 20:10:35 +00:00
dan
3b2c9b3250
Modify the code in vdbesort.c so that most reads and writes to temporary files are aligned page-sized blocks.
...
FossilOrigin-Name: 55e47ef338c42f95f0f071d6ec92cd2480f9f1fe
2012-07-23 19:25:39 +00:00
drh
3fb757b487
More structure packing for smaller objects and less memory usage.
...
FossilOrigin-Name: f14e7f29ff7f2d7706dc3cdd715e103e04ba0ef1
2012-02-02 21:02:43 +00:00
mistachkin
0fe5f95c7f
Remove 'const' from a variable that might actually be written when an OOM error occurs. Also, fix a couple MSVC/Win32 compiler warnings.
...
FossilOrigin-Name: 3035dc1c7398791d550f4c02774ef7f961b4bb02
2011-09-14 18:19:08 +00:00
drh
244b632cf7
Remove unused parameters from internal routines in vdbesort.c. This is
...
an additional simplification made possible by recent optimizations.
FossilOrigin-Name: a1f3aeeb0988c848d40ce8f6da6e902935a997e2
2011-09-14 13:41:40 +00:00
drh
59ebc99161
Remove code from vdbesort.c that was made unreachable by the recent
...
sqlite3VdbeRecordUnpack() optimizations.
FossilOrigin-Name: 607aba6cd7020973200fa376cf8df55360165266
2011-09-14 13:23:21 +00:00
dan
42acb3e597
Fix a minor performance regression in btreeMoveto().
...
FossilOrigin-Name: d0712dfb24867a807c9cddcc12bd0aebe1d3e085
2011-09-05 20:16:38 +00:00
dan
03e9cfc223
Refactor the sqlite3VdbeRecordUnpack() interface to better accommodate the vdbesort.c module.
...
FossilOrigin-Name: f115b2303509c678dbe83b2fa3d9c40d82882813
2011-09-05 14:20:27 +00:00
drh
19c88c1a99
Fix a compiler warning about an unused parameter in the merge-sort code.
...
FossilOrigin-Name: 6b657ae75035eb10b0ad640998d3c9eadfdffa6e
2011-09-04 01:27:00 +00:00
drh
c2bb3282f1
Improve the testability of the merge-sort logic.
...
FossilOrigin-Name: b5179baf87aa00ed5cecbdcaa65bee10e112a9e9
2011-09-04 01:11:46 +00:00
drh
04a962fe02
Simplification and performance tweaks in vdbeSorterMerge().
...
FossilOrigin-Name: 99e34bdce4ccca15b79159b03b96787e7a7ff85b
2011-09-03 16:42:38 +00:00
dan
8b1ea14f8c
Reduce the number of VdbeRecordUnpack() calls made in vdbesort.c.
...
FossilOrigin-Name: 666c2c3cff51dac2ba5689b75705d99c3705673b
2011-09-03 14:36:13 +00:00
drh
ca892a7252
The build works again with -DSQLITE_OMIT_MERGE_SORT. The merge-sorter now
...
avoids spilling to disk (letting the in-memory linked list grow without
bound) if PRAGMA temp_store=3.
FossilOrigin-Name: 68e26c4487696d194ee85370380e4b0e56d206ee
2011-09-03 00:17:51 +00:00
drh
34163c6831
Remove some dead code. Fix a faulty assert(). Improve some variable names.
...
FossilOrigin-Name: a9a64592cf88580cb254fb0aac65a2f2085976ec
2011-09-02 21:42:33 +00:00
dan
7733a4db4b
Combine two malloc calls in vdbesort.c.
...
FossilOrigin-Name: cf48ad8353e28339d00f448bb729e10a7f2aad72
2011-09-02 18:03:16 +00:00
dan
7f72114547
Reduce the number of malloc() calls made when creating an index on more than 2 columns.
...
FossilOrigin-Name: 065b0c9858da0ebb41722f3c56bdaf62f28b2f2c
2011-09-02 15:41:33 +00:00
dan
9fed558df9
If all data being sorted fits in memory, avoid writing any data out to temporary files in vdbesort.c.
...
FossilOrigin-Name: 71075673c625f243969c3f34c73f28f378924007
2011-09-02 11:45:31 +00:00
dan
5134d1357e
Instead of a temporary b-tree, use a linked-list and merge-sort to sort records in main memory in vdbesort.c.
...
FossilOrigin-Name: 7769fb988d9be0f2d8129aaac19620ac88f9b4a6
2011-09-02 10:31:11 +00:00