1
0
Fork 0
Commit Graph

208 Commits

Author SHA1 Message Date
Max Neunhoeffer 511930a8c1 Make variable bounds compile-time switchable. 2014-09-14 22:30:45 +02:00
Max Neunhoeffer 025d57175e Disable variable bounds to let tests run again. 2014-09-14 22:26:57 +02:00
Max Neunhoeffer e617c091e7 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-09-14 21:47:46 +02:00
Max Neunhoeffer b48d1c1270 Fix more bugs. 2014-09-14 21:47:37 +02:00
Jan Steemann ed7e5d0e67 allow primary key access via _id attribute, too 2014-09-14 00:46:44 +02:00
Jan Steemann 4f6f2ac34f Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionBlock.cpp
2014-09-12 17:03:04 +02:00
Max Neunhoeffer 0ae0f126b2 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-09-12 15:24:28 +02:00
Max Neunhoeffer 465cf950c9 Try to fix bug with variable bounds.
Not yet finished.
2014-09-12 15:24:08 +02:00
Jan Steemann 6552490cbe Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionNode.cpp
	arangod/Aql/ExecutionNode.h
	arangod/Aql/ExecutionPlan.cpp
	arangod/Aql/OptimizerRules.cpp
2014-09-12 15:17:50 +02:00
Jan Steemann a5c52998e8 remove redundant calculations 2014-09-12 15:10:48 +02:00
Max Neunhoeffer 35ffe6b9e4 Restructure who has Ast and ExecutionPlan.
Not compiling yet.
2014-09-12 14:44:20 +02:00
Jan Steemann 2767bdc7e0 use edge index on both _from and _to 2014-09-11 18:19:05 +02:00
Jan Steemann c3b90a1037 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-09-11 17:02:03 +02:00
Jan Steemann 34beb65148 use primary index & edge index 2014-09-11 17:01:53 +02:00
Max Neunhoeffer 6c69129a71 Start computing the variable bounds at runtime. 2014-09-11 16:58:59 +02:00
Max Neunhoeffer 31e02e42cb Instanciate expressions for variable bounds.
And various cleanups.
2014-09-11 14:28:38 +02:00
Max Neunhoeffer c79b95b048 Activate finding of variable bounds. 2014-09-10 16:35:33 +02:00
Max Neunhoeffer 27a9dd050e Variable bounds are recognised. 2014-09-10 16:10:02 +02:00
Max Neunhoeffer 31a1c95e40 Further cleanup of IndexRangeRule and ranges infrastructure.
Prepare for variable bounds.
2014-09-10 12:07:30 +02:00
Max Neunhoeffer dfed690d56 Further cleanup of EQ method in useIndexRange rule. 2014-09-10 11:36:11 +02:00
Max Neunhoeffer 6795f425ab Cleanup buildRangeInfo. 2014-09-10 11:15:43 +02:00
Max Neunhoeffer 7dcdd27891 Merge branch 'aql2' into mmh 2014-09-10 09:41:54 +02:00
Max Neunhoeffer b98cb86605 Take out debugging output. 2014-09-10 09:38:53 +02:00
Willi Goesgens 3e6e008a81 useIndexForSort:
- redirect to pass #5 here too, so now possible obsolete CalculaionNodes are removed by the removeUnnecessaryCalculationsRule
2014-09-09 17:19:49 +02:00
Max Neunhoeffer 8aa75f01a5 Snapshot to move home. 2014-09-09 17:05:47 +02:00
Willi Goesgens 202636cee0 Refactor Optimizer ordering
- create enum with the different steps named
  - unify numbering scheme
  - deploy enum to all places where int level was used
  - add passN enum so you can jump to a Pass when calling addPlan

useIndexForSort:
  - remove inline deletion of dependend nodes of our (removed) sortnode
  - redirect to pass #5 so now possible obsolete CalculaionNodes are removed by the removeUnnecessaryCalculationsRule
2014-09-09 16:27:49 +02:00
Jan Steemann 2a49bf843d updated tests 2014-09-09 15:20:42 +02:00
Jan Steemann 639a026c66 fixed tests 2014-09-09 09:57:52 +02:00
Jan Steemann 4bda3e3979 finished test for remove-redundant-sorts 2014-09-08 17:33:11 +02:00
Jan Steemann 8fdb2f05af added positive list of nodetypes 2014-09-08 10:39:59 +02:00
Jan Steemann 478007089a do not push sort beyond limit, collect etc. 2014-09-08 10:31:44 +02:00
Willi Goesgens 02207d5f70 Cost estimates: IndexRangeNodes without range have to be more expensive than ones with. 2014-09-05 14:23:25 +02:00
Willi Goesgens ebbb9c34b6 Redundand-Sort: implement removing of left item superseeding the sort 2014-09-04 17:53:20 +02:00
Willi Goesgens e23cbf1add Work on Filter to IndexRangeNode tests 2014-09-04 16:33:37 +02:00
Willi Goesgens 61d1bfa76b SortIndex: only indicate we modified a rule if we realy did. 2014-09-03 09:47:08 +02:00
Willi Goesgens 021f3371f2 SortIndex: move the unlinking of the sort attributes after unlinking the sort itself 2014-09-01 18:30:49 +02:00
Willi Goesgens 3b93d0847d SortIndex: fix the way we register our results to the framework 2014-09-01 13:33:18 +02:00
Max Neunhoeffer ecf379c113 Fix a bug with the level management of the useSortRule. 2014-08-30 00:54:47 +02:00
James b6f9f11e5e added all node types to FilterToEnumCollFinder. 2014-08-29 17:44:32 +02:00
James 38520d49eb Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-29 17:17:59 +02:00
James 21febb33ac cleaning up RangeInfo stuff. 2014-08-29 17:16:08 +02:00
Willi Goesgens 40361d63dc Merge branch 'aql2' of github.com:triAGENS/ArangoDB into aql2 2014-08-29 17:10:35 +02:00
Willi Goesgens 1f0ce045d3 remove debug output 2014-08-29 17:10:20 +02:00
Max Neunhoeffer bf1f11e651 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-29 16:57:56 +02:00
Max Neunhoeffer fa9e55eafb Finish taking into account multiple FILTER for IndexRangeRule. 2014-08-29 16:57:34 +02:00
Willi Goesgens 0cb12fc3f5 SortIndex: initialize the rangeInfo the proper way. 2014-08-29 16:45:20 +02:00
Max Neunhoeffer 4ae076db40 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-29 15:51:08 +02:00
Max Neunhoeffer 65e765478d Make IndexRange rule look for multiple variables in FILTERs.
Still TODO: Pickup further variables when seeing FILTERs.
2014-08-29 15:49:37 +02:00
Jan Steemann 91590f754f Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-29 15:49:35 +02:00
Jan Steemann b8e12063e2 added "rules" output 2014-08-29 15:27:02 +02:00
James e1ee728a75 remove debug prints. 2014-08-29 14:41:20 +02:00
Willi Goesgens 67894665f4 revert #cef3864e29cfb5308df55e19a2186af07c21d3b8 which was a wrong conflict resolution. 2014-08-29 14:38:39 +02:00
Willi Goesgens d6881ddabd Merge branch 'aql2' of github.com:triAGENS/ArangoDB into aql2 2014-08-29 12:27:33 +02:00
Willi Goesgens be1c84f480 Exceptions: don't print Backtraces if the exception is handled in the subsequent js code. 2014-08-29 12:15:19 +02:00
James 16ef52bd81 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-29 11:52:46 +02:00
James 46b40015ee renovating RangeInfo stuff to avoid mem leaks. 2014-08-29 11:52:19 +02:00
Max Neunhoeffer c9193e44b8 Sort out some exception issues. 2014-08-29 11:37:01 +02:00
Max Neunhoeffer f780cff9c6 Fix a bug with a new plan and insert a catch. 2014-08-29 11:09:18 +02:00
Jan Steemann c47807e2ee Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-28 16:56:05 +02:00
James a14be1d3be Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-28 16:55:39 +02:00
Jan Steemann 687c56f923 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-28 16:55:22 +02:00
James 4b5e42c52a bugfixes and leaks fixed. 2014-08-28 16:55:18 +02:00
Jan Steemann d3624c3244 attempt to fix infinite ranges in skiplists 2014-08-28 16:54:45 +02:00
Max Neunhoeffer 16a5899e8f Add a FIXME. 2014-08-28 16:52:03 +02:00
Max Neunhoeffer c1568d94f0 Improve a comment. 2014-08-28 16:50:26 +02:00
Jan Steemann fd5e687ef0 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-28 15:34:17 +02:00
Jan Steemann 694d64da3c do not optimize away non-deterministic functions 2014-08-28 15:34:06 +02:00
Max Neunhoeffer 665777c59a Make dummyRule local in the optimizer. 2014-08-28 14:49:33 +02:00
James 05dac4f52d Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/Optimizer.cpp
2014-08-28 14:41:51 +02:00
James 1deed3ebce fixed bugs useIndexRange. 2014-08-28 14:39:26 +02:00
Jan Steemann 7ba6b17d45 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-28 13:54:37 +02:00
Jan Steemann ca814c9733 remove-redundant-sorts 2014-08-28 13:54:17 +02:00
Max Neunhoeffer 9b49328218 Rearrange levels for optimizer rules. Use rules multiple times. 2014-08-28 13:46:46 +02:00
Max Neunhoeffer e1b557ff20 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/Optimizer.cpp
2014-08-28 13:33:33 +02:00
Max Neunhoeffer 12e15b6c2e Adjust the output level of useSortIndex rule. 2014-08-28 13:29:44 +02:00
Max Neunhoeffer 338a9c6c54 Implement permutation of EnumerateCollectionNodes.
Also: restructure leveling of rules.
And:  remove some debugging output (and add some other).
2014-08-28 13:28:04 +02:00
Jan Steemann 2eb38c9657 remove-redundant-sorts, initial 2014-08-28 12:39:28 +02:00
Willi Goesgens 9d4b1b1c88 SortNode: our variables can also be in other ExecutionNodes then the Calculation node. Take this into account.
SortIndex optimizer: when looking at our properties only check Calculation nodes, ignore other types of ExecutionNodes
2014-08-28 11:48:23 +02:00
Willi Goesgens 7b9b3d8570 fix memory leak in parametrization of new IndexRangeNodes 2014-08-28 09:20:47 +02:00
Jan Steemann 37295fb2b1 changed wrong comments 2014-08-27 23:54:06 +02:00
Max Neunhoeffer f279c40262 Fix an early destruction bug. 2014-08-27 22:10:18 +02:00
Max Neunhoeffer 4441316115 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-27 16:52:57 +02:00
Max Neunhoeffer 449d0cd961 Completely redo the optimizer. 2014-08-27 16:52:38 +02:00
Willi Goesgens da6bac560d SortIndex optimizer: clean up namingschemes, add documentation. 2014-08-27 16:09:25 +02:00
Willi Goesgens e67a2ed36a SortIndex optimizer:
- remove SortNodes which are superseeded by an IndexRangeNode
  - calculate the properties of an SortNode before entering the walker
  - add abstraction class
2014-08-27 15:39:37 +02:00
James 61ee74e0fd Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-27 14:52:05 +02:00
Willi Goesgens 5e75ec8bb5 Expression:
- add function isSimpleAccessReference() to check whether it is a coll.attr.attr
 - add function getAccessNRef() to retrieve pair("attr.attr", "coll"),
SortIndex optimizer:
 - use the new functionality to get better readable code.
rename indexes -> indices
2014-08-26 17:26:46 +02:00
Willi Goesgens 18d308af0f SortNode: add method that looks up the expressions referenced by the Sortnode, and returns them paired with ASC/DESC. 2014-08-26 15:38:55 +02:00
James 851420c723 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-26 15:19:13 +02:00
Willi Goesgens ff4e00eb86 SortIndex optimizer:
- rename getIndexes to getIndexesUnordered
  - add CompareIndex & getIndexesOrdered to retrieve a list which does an ordered match on the available skiplist indices
  - fetch the ordered matching indices
  - only remove the sortnode if its a full qualified match.
2014-08-26 13:53:19 +02:00
James b8415aaca5 making useIndexRange abort if it encounters a limit node. 2014-08-26 13:11:31 +02:00
James ad3e6d22a1 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-26 13:02:58 +02:00
James bf952d37be IndexRangeBlock working for hash indexes. 2014-08-26 13:02:31 +02:00
Willi Goesgens 27063a08b5 SortIndex optimizer:
- group the ASC/DESC
 - find out the real attribute name for nested attributes
2014-08-26 09:48:20 +02:00
Max Neunhoeffer a7b3f4fe1f Take out TODO line. 2014-08-26 09:46:00 +02:00
Max Neunhoeffer 4fecd85e4c Add a destructor to delete _ranges in FilterToEnumCollFinder. 2014-08-26 09:45:32 +02:00
Willi Goesgens 10603f904d Walker: the process of walking now is aborted if the before-hook returns true. 2014-08-25 15:48:21 +02:00
James 8896a01753 making the arguments of IndexRangeNode more general. 2014-08-25 15:11:54 +02:00
James 033735fbba removing debug output and commenting out useIndexRange. 2014-08-25 13:12:19 +02:00
James c801fc4992 deserialising of IndexRangeNode finally working. 2014-08-25 13:05:22 +02:00