From 4dc2d4b7fcbd5fd4a43f7370e2ed98bba4654d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg?= Date: Fri, 3 Dec 2021 16:25:04 +0100 Subject: [PATCH] Added query option for disabled fillBlockCache. --- arango/aql.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arango/aql.py b/arango/aql.py index dcbff732..649a9438 100644 --- a/arango/aql.py +++ b/arango/aql.py @@ -263,6 +263,7 @@ def execute( stream: Optional[bool] = None, skip_inaccessible_cols: Optional[bool] = None, max_runtime: Optional[Number] = None, + fill_block_cache: Optional[bool] = None, ) -> Result[Cursor]: """Execute the query and return the result cursor. @@ -345,6 +346,16 @@ def execute( it is killed. The value is specified in seconds. Default value is 0.0 (no timeout). :type max_runtime: int | float + :param fill_block_cache: If set to true or not specified, this will + make the query store the data it reads via the RocksDB storage + engine in the RocksDB block cache. This is usually the desired + behavior. The option can be set to false for queries that are + known to either read a lot of data which would thrash the block + cache, or for queries that read data which are known to be outside + of the hot set. By setting the option to false, data read by the + query will not make it into the RocksDB block cache if not already + in there, thus leaving more room for the actual hot set. + :type fill_block_cache: bool :return: Result cursor. :rtype: arango.cursor.Cursor :raise arango.exceptions.AQLQueryExecuteError: If execute fails. @@ -364,6 +375,8 @@ def execute( options: Json = {} if full_count is not None: options["fullCount"] = full_count + if fill_block_cache is not None: + options["fillBlockCache"] = fill_block_cache if max_plans is not None: options["maxNumberOfPlans"] = max_plans if optimizer_rules is not None: