Skip to content

Commit fded4b7

Browse files
Add --debug-query-plans (#1187)
* Add --debug-query-plans * change order to alphabetical * change default to false * add note on how to use new flag --------- Co-authored-by: katarinasupe <supe.katarina@gmail.com>
1 parent 39df1e3 commit fded4b7

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

pages/database-management/configuration.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ This section contains the list of all other relevant flags used within Memgraph.
489489
| `--also-log-to-stderr=false` | Log messages go to stderr in addition to logfiles. | `[bool]` |
490490
| `--data-directory=/var/lib/memgraph` | Path to directory in which to save all permanent data. | `[string]` |
491491
| `--data-recovery-on-startup=true` | Facilitates recovery of one or more individual databases and their contents during startup. Replaces `--storage-recover-on-startup` | `[bool]` |
492+
| `--debug-query-plans=false` | Enable DEBUG logging of potential query plans. | `[string]` |
492493
| `--delta-chain-cache-threshold=128` | The minimum number of deltas worth caching when rebuilding a certain object's state. Useful when executing parallel transactions dependant on changes of a frequently changed graph object, to lower CPU usage. Must be a positive non-zero integer. | `[uint64]` |
493494
| `--flag-file` | Path to the additional configuration file, overrides the default configuration settings. | `[string]` |
494495
| `--help` | Show help on all flags and exit. The default values is `false`. | `[bool]` |

pages/database-management/logs.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ You can check the log level by running `SHOW DATABASE SETTING "log.level";` quer
2626
To access the logs from the Memgraph Lab interface, make sure to expose the port
2727
7444 when starting Memgraph with Docker.
2828

29+
<Callout type="info">
30+
To get additional information on the generated query plans, set
31+
`--debug-query-plans` to `True`, along with `--log-level` set to `DEBUG` or `TRACE`.
32+
</Callout>
33+
2934
## Access logs
3035

3136
If you installed Memgraph with Linux, logs can be found in the

pages/querying/best-practices.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ nonsense or sales pitch, just tech.
9696
/>
9797
</Cards>
9898

99+
To prepare the information we need to help you debug the issue, it is best to
100+
have `--log-level` set to `TRACE` along with the `--debug-query-plans` set to `True`.
101+
That will provide better diagnostics to identify poor cost modelling over
102+
generated plans and hence poor plan selection.
103+
99104
## How to speed up query execution
100105

101106
Before diving into the details of the query execution optimization, it is

0 commit comments

Comments
 (0)