@@ -7,6 +7,8 @@ description: >-
77 they operate on, as well as design limitations to be aware of
88archetype : default
99---
10+ ## Complexity limitations
11+
1012The following hard-coded limitations exist for AQL queries:
1113
1214- An AQL query cannot use more than _ 1000_ result registers.
@@ -37,7 +39,9 @@ of different collections. Please also consider that large queries (in terms of
3739intermediate result size or final result size) can use considerable amounts of
3840memory and may hit the configurable memory limits for AQL queries.
3941
40- The following other limitations are known for AQL queries:
42+ ## Design limitations
43+
44+ The following design limitations are known for AQL queries:
4145
4246- Subqueries that are used inside expressions are pulled out of these
4347 expressions and executed beforehand. That means that subqueries do not
@@ -52,3 +56,50 @@ The following other limitations are known for AQL queries:
5256 [ ` WITH ` statement] ( ../high-level-operations/with.md ) . To make the ` WITH ` statement
5357 required in single server as well (e.g. for testing a migration to cluster),
5458 please start the server with the option ` --query.require-with ` .
59+
60+ ## Storage engine properties
61+
62+ {{< info >}}
63+ The following restrictions and limitations do not apply to JavaScript Transactions
64+ and Stream Transactions, including AQL queries that run inside such transactions.
65+ Their intended use case is for smaller transactions with full transactional
66+ guarantees. So the following only applies to standalone AQL queries.
67+ {{< /info >}}
68+
69+ Data of ongoing transactions is stored in RAM. Transactions that get too big
70+ (in terms of number of operations involved or the total size of data created or
71+ modified by the transaction) are committed automatically. Effectively, this
72+ means that big user transactions are split into multiple smaller RocksDB
73+ transactions that are committed individually. The entire user transaction does
74+ not necessarily have ACID properties in this case.
75+
76+ The following startup options can be used to control the RAM usage and automatic
77+ intermediate commits for the RocksDB engine:
78+
79+ - ` --rocksdb.max-transaction-size `
80+
81+ Transaction size limit (in bytes). Transactions store all keys and values in
82+ RAM, so large transactions run the risk of causing out-of-memory situations.
83+ This setting allows you to ensure that does not happen by limiting the size of
84+ any individual transaction. Transactions whose operations would consume more
85+ RAM than this threshold value will abort automatically with error 32 ("resource
86+ limit exceeded").
87+
88+ - ` --rocksdb.intermediate-commit-size `
89+
90+ If the size of all operations in a transaction reaches this threshold, the transaction
91+ is committed automatically and a new transaction is started. The value is specified in bytes.
92+
93+ - ` --rocksdb.intermediate-commit-count `
94+
95+ If the number of operations in a transaction reaches this value, the transaction is
96+ committed automatically and a new transaction is started.
97+
98+ The above values can also be adjusted per query, for example, by setting the
99+ following attributes in the call to ` db._query() ` in the JavaScript API:
100+
101+ - ` maxTransactionSize ` : transaction size limit in bytes
102+ - ` intermediateCommitSize ` : maximum total size of operations after which an intermediate
103+ commit is performed automatically
104+ - ` intermediateCommitCount ` : maximum number of operations after which an intermediate
105+ commit is performed automatically
0 commit comments