1
0
Fork 0
Commit Graph

772 Commits

Author SHA1 Message Date
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
Jan Steemann b978133e1b fixed compile warning 2014-08-22 20:05:44 +02:00
Jan Steemann 768c3b9bbc comments 2014-08-22 18:03:42 +02:00
Jan Steemann 04fbe668cc Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-22 17:58:12 +02:00
Jan Steemann 1d34fa4896 stub for IndexRangeBlock 2014-08-22 17:58:02 +02:00
Willi Goesgens 8a402683ed Optimizers: start implementing the sorting via indexes. 2014-08-22 16:48:52 +02:00
James 8559f60766 fixed bugs in last. 2014-08-22 16:25:23 +02:00
James 931aaee618 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-22 16:19:01 +02:00
James 4c49a3be5e deserialising of IndexRangeNode almost completed. 2014-08-22 16:17:10 +02:00
Jan Steemann 514c2e74f3 indentation 2014-08-22 13:56:01 +02:00
Jan Steemann 55608ceae2 use index nodes 2014-08-22 13:53:01 +02:00
Jan Steemann 30c6b26b6d add plans! 2014-08-22 10:44:19 +02:00
James fcb3342729 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-21 18:41:24 +02:00
James fecaccf37f fixing comparison of bounds. 2014-08-21 18:40:02 +02:00
James 89ba89bf77 added method to check if a range info contains a unique value, and cleaned up FilterToEnumCollFinder. 2014-08-21 17:39:06 +02:00
James 409e663818 fixed bugs in comparison of tightness of range bounds, and made it so that invalid ranges insert NoResultNode in the plan. 2014-08-21 17:14:42 +02:00
Jan Steemann 4482d840ac added moveFiltersUpRule 2014-08-21 16:54:01 +02:00
Jan Steemann a1fcf9b28e activate rule to move calculations up 2014-08-21 16:38:49 +02:00
Jan Steemann 89e74559ae Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-21 15:54:48 +02:00
Jan Steemann 0205f651a6 working on moveCalculationsUpRule 2014-08-21 15:54:40 +02:00
Max Neunhoeffer 5aaa4cf899 Merge. 2014-08-21 15:50:16 +02:00
James 053ab548ba Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-21 15:48:58 +02:00
James 4d17c347cc bug fixes in last. 2014-08-21 15:38:42 +02:00
James deaa8f1271 only applying hash indexes if ranges indicate equality. 2014-08-21 15:27:53 +02:00
Jan Steemann 51c89c6829 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionPlan.cpp
	arangod/Aql/ExecutionPlan.h
2014-08-21 15:24:11 +02:00
Max Neunhoeffer 321ab35551 Finish _parents in ExecutionNodes business. 2014-08-21 15:15:46 +02:00
Jan Steemann 1d78071176 fixed filter removal optimizer rule 2014-08-21 13:57:08 +02:00
Max Neunhoeffer af93a13209 Fix instanciation of NoResultsNode. 2014-08-21 13:45:46 +02:00
James 7b5f52069a Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-21 13:16:24 +02:00
James bcaf26cba1 removing debug comments. 2014-08-21 13:14:41 +02:00
James aa03c16be0 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-21 12:53:05 +02:00
James c4811009a8 fixing replaceNode for ExecutionPlan. 2014-08-21 12:32:07 +02:00
Jan Steemann 1edd170317 turned off optimization 2014-08-21 11:21:03 +02:00
James a8801803dd more IndexRangeNode stuff 2014-08-21 11:16:39 +02:00
Max Neunhoeffer cf6fe967a1 Make enterSubqueries switchable in findNodesOfType 2014-08-21 09:44:59 +02:00
Jan Steemann 670b407185 disable filters that never produce results 2014-08-20 18:24:52 +02:00
James b5d4fc52d1 added clone method for execution plan, removed debug prints. 2014-08-20 16:34:35 +02:00
James 260c790bc5 fixed bugs in last. 2014-08-20 16:13:53 +02:00
Jan Steemann 3fe8831a03 fixed optimizer bug due to duplicate variable representation 2014-08-20 14:18:33 +02:00
James 24b2dd1906 finding index in CalculationNodeFinder. 2014-08-20 11:38:02 +02:00
Jan Steemann 592ada1d36 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionNode.h
2014-08-19 18:58:32 +02:00
Jan Steemann 99ce138c12 fixed creation of subqueries from JSON input 2014-08-19 18:51:11 +02:00
James 447282d0bd Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/Optimizer.cpp
	arangod/Aql/OptimizerRules.cpp
2014-08-19 17:00:16 +02:00
James c0ce6d361c AND working for IndexRangeNode. 2014-08-19 16:58:10 +02:00
Jan Steemann 232cc163c2 renamed optimizer rule 2014-08-19 16:10:57 +02:00
Jan Steemann 70a4f49095 removed commented code 2014-08-19 16:09:10 +02:00
James 370892566f added new class to contain ranges, and take their intersections. 2014-08-19 15:53:17 +02:00
Jan Steemann 79e68e72e3 fixed removeUnnecessaryCalc 2014-08-19 15:46:04 +02:00
Jan Steemann e4abcdc843 added optimizer rule 2014-08-19 13:59:05 +02:00
James b82b0fbefc remove comment and update the toJsonHelper for IndexRangeNode. 2014-08-19 12:08:22 +02:00
James 857083adc9 starting to add optimizer rules which create IndexRangeNodes. 2014-08-19 12:02:50 +02:00
Jan Steemann 1030ea1b7c working on optimizer rules 2014-08-19 10:22:08 +02:00
Jan Steemann 36430620fa remove filters which are always true 2014-08-18 17:03:08 +02:00
Jan Steemann b923e660e8 comments 2014-08-18 16:58:31 +02:00
Jan Steemann f41e0313fe added optimization rule for constant filters (not yet working) 2014-08-18 16:53:45 +02:00
Max Neunhoeffer 9e91d9bba3 Finish first optimization rule: remove unnecessary calcs.
So far not activated, because test suite crashes.
Need to look into details.
2014-08-16 00:09:11 +02:00
Max Neunhoeffer f671fb7e36 Add the first actual optimization rule (as a stub). 2014-08-15 16:54:53 +02:00
Max Neunhoeffer 50851bfcba 2nd try at infrastructure for optimizer. 2014-08-14 14:33:03 +02:00
Max Neunhoeffer 1de9f0bfe5 Create infrastructure for the query optimizer. 2014-08-14 11:16:21 +02:00