1
0
Fork 0
Commit Graph

79 Commits

Author SHA1 Message Date
Jan Steemann a25881ed7b fixed cases with incorrectly optimised queries, leading to wrong results
The issue was caused when the optimiser decided to use an index on an attribute, but the attribute access was contained in a logical OR as follows:

FILTER (c.<indexed-column> == <value> || c.<some-other-column> == c.<indexed-column>)

In this case, the index on <indexed-column> was accessed with the constant <value>, but the right-hand side of the OR was ignored, leading to possibly incomplete results
2012-11-07 18:33:38 +01:00
Jan Steemann bdccef3965 whitespace 2012-11-07 18:15:10 +01:00
Jan Steemann a68fff16e2 issue #271: allow very simple optimisations for AQL function usage
This change will create field access hints also for AQL function calls.
Calls to functions will not be optimised, but meaningless usages of functions will not be optimised away.
For example:

FOR p IN PATHS(users, relations, "outbound")
  FILTER LENGTH(p.edges) > 0 && LENGTH(p.edges) < 0
  RETURN p

The FILTER in the above query uses the LENGTH() function two times in a way that no result will be produced.
Before, function calls were excluded from expression collapsing and simplification.
Now, multiple calls to the same function with the same call argument might be optimised away if the calls will
lead to no results being produced. This will only work for functions that are called with exactly one argument
which also must be an attribute name, and when the function calls are used in relational operations.
2012-10-26 13:32:01 +02:00
Jan Steemann 792f57b760 issue #271: simple paths() function optimisations
When an "outbound" query is made with the paths() function, the optimiser will now use an index if a FILTER condition can exploit an index on .source.
Example query:

FOR p IN PATHS(users, relations, "outbound")
  FILTER p.source._id == "some-id"
  RETURN p

The index on p._id was not exploited before, because the optimiser did not know that variable "p" related to collection "users" and that the condition actually would filter on users._id (the variable name in the FILTER statement is "p.source._id).
Now, AQL functions can define callbacks which are called by the optimiser to try some function-specific optimisations.
The optimise callback for PATHS() tries to exploit indexes for filters that filter on the vertex collection (1st parameter to PATHS() call). Indexes can be exploited if the query is an "outbound" query and there are filters on "source", or if the query is an "inbound" query and there are filters on "destination". "anybound" queries will not be optimised
2012-10-26 13:32:01 +02:00
Oreste Panaia 4d8d78e880 Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
Conflicts:
	VisualStudio/Arango Front End Library/Arango Front End Library.vcxproj
	arangod/Actions/RestActionHandler.cpp
	arangod/RestServer/ArangoServer.cpp
	lib/ApplicationServer/ApplicationServer.cpp
2012-10-22 21:04:12 +08:00
Oreste Panaia aad73db128 various changes for windows 2012-10-22 20:51:31 +08:00
Jan Steemann d117f2916a issue #248: pull out some sort of subqueries 2012-10-22 09:14:38 +02:00
Jan Steemann c2be68fc7f issue #245 2012-10-17 14:21:46 +02:00
Jan Steemann fc0e64f812 issue #247 2012-10-17 13:07:44 +02:00
Jan Steemann bf3d14eb14 changed gitignore, added derived files 2012-10-15 09:36:50 +02:00
Frank Celler cd51f5a39f added missing bison files 2012-10-14 16:41:01 +02:00
Frank Celler 195d6903c1 added generated files 2012-10-14 16:23:48 +02:00
Frank Celler 939c5ece15 Merge branch '1.0' of github.com:triAGENS/ArangoDB
Conflicts:
	CHANGELOG
	CONTRIBUTING.md
	Doxygen/arango-html.doxy
	Doxygen/arango-latex.doxy
	Doxygen/arango-xml.doxy
	Doxygen/arango.template
	Makefile.in
	Makefile.local
	Makefile.unittests
	VERSION
	config/config.sub
	configure
	configure.ac
	js/actions/system/api-system.js
	js/client/js-client.h
	js/common/bootstrap/js-modules.h
	js/server/js-ahuacatl.h
	packetize.sh
2012-10-11 15:19:44 +02:00
Jan Steemann e906fe374c fixed memory issues 2012-10-11 14:17:19 +02:00
Jan Steemann a4b979222f fixed memory zone issues, memleaks 2012-10-10 19:05:16 +02:00
Jan Steemann 6847caac80 changed misleading member name (secondaryIndexes => allIndexes) 2012-10-10 11:24:36 +02:00
Jan Steemann 6d96d040fa added AQL function TO_LIST 2012-10-10 11:02:56 +02:00
Jan Steemann eb11086ae5 added AQL function TO_LIST 2012-10-10 10:51:35 +02:00
Oreste Panaia 5faa701537 Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel 2012-10-08 23:31:15 +08:00
Oreste Panaia fbd74b3569 windows 2012-10-08 23:30:30 +08:00
Jan Steemann 5da08eb283 allow AQL to use indexes in additional cases 2012-10-08 12:51:27 +02:00
Jan Steemann 3801d6df8a Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel 2012-09-28 11:58:45 +02:00
Jan Steemann 629b157571 regenerated the parser files 2012-09-28 11:58:23 +02:00
Oreste Panaia 2a71a3c371 minor changes for windows compatability 2012-09-28 17:34:22 +08:00
Jan Steemann 10d6167d45 removed some unused compile options 2012-09-25 21:24:02 +02:00
Frank Celler 4181fd5cc4 regenerated files 2012-09-21 17:44:25 +02:00
Jan Steemann eb1c4cec6d Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel 2012-09-19 09:30:37 +02:00
Jan Steemann b682fa0fdb compiled with Bison 2.5 2012-09-19 09:29:55 +02:00
Oreste Panaia 2ec059e758 Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
Conflicts:
	arangod/Ahuacatl/ahuacatl-grammar.c
	arangod/Ahuacatl/ahuacatl-grammar.y
2012-09-17 23:01:26 +08:00
Oreste Panaia f5316acb9d Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
Conflicts:
	arangod/Ahuacatl/ahuacatl-grammar.c
	arangod/V8Server/v8-vocbase.cpp
	arangod/VocBase/document-collection.c
	arangod/VocBase/document-collection.h
2012-09-17 22:40:12 +08:00
Jan Steemann 2379e1f0c3 fixed broken grammar file 2012-09-17 16:37:21 +02:00
Oreste Panaia c7e5eae52d Added additional error numbers for bitarray index creation 2012-09-17 19:57:10 +08:00
Jan Steemann 1ef037ce8c renamed indexes to secondaryIndexes 2012-09-17 09:54:12 +02:00
Jan Steemann 7d512be4bb make clean deletes more 2012-09-14 15:40:29 +02:00
Jan Steemann 1b1d7ba877 renamed simple_collection to document_collection 2012-09-14 14:46:37 +02:00
Jan Steemann 9bc99b7c9d renamed document collection to primary collection 2012-09-14 10:19:41 +02:00
Jan Steemann 5c2b89ea38 did not remove enough code last time. fixed 2012-09-11 10:56:19 +02:00
Jan Steemann 135af312da removed some old debug macros 2012-09-11 09:56:57 +02:00
Jan Steemann 21ff560bce removed senseless macro 2012-09-11 09:43:57 +02:00
Oreste Panaia f93eef34d7 git
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

Conflicts:
	lib/ShapedJson/json-shaper.c
2012-09-10 20:53:41 +08:00
Oreste Panaia 8847d87580 added limited AQL support for bit indexes 2012-09-10 20:42:14 +08:00
Jan Steemann 2bca2a964b more trace messages 2012-09-07 11:23:46 +02:00
Jan Steemann 374b65e0d7 issue #177: fixed wrong error message 2012-08-31 10:49:36 +02:00
Jan Steemann 31dbf59cc8 issue #137: AQL optimizer should use indexes for ref accesses with 2 named attributes 2012-08-06 13:08:45 +02:00
Jan Steemann a70d4f2920 issue #137: exploit indexes for FILTER patterns collection.attribute operator collection.attribute 2012-08-06 12:56:11 +02:00
Jan Steemann 34441137df preparation work for issue #137 2012-08-06 10:34:56 +02:00
Jan Steemann 8326bb2abf preparation work for issue #137 2012-08-06 10:30:15 +02:00
Frank Celler d69586beb0 fixed installation issures 2012-06-30 10:32:50 +02:00
Jan Steemann 3411a9b98c fixed a few query optimiser bugs, added test cases 2012-06-29 15:26:35 +02:00
Jan Steemann 586820f044 bug fixes for the query optimiser 2012-06-29 14:32:19 +02:00