Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added query option for disabled fillBlockCache. #182

Merged
merged 2 commits into from
Dec 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions arango/aql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand Down