Skip to content

Add --debug-query-plans #1187

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions pages/database-management/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ This section contains the list of all other relevant flags used within Memgraph.
| `--also-log-to-stderr=false` | Log messages go to stderr in addition to logfiles. | `[bool]` |
| `--data-directory=/var/lib/memgraph` | Path to directory in which to save all permanent data. | `[string]` |
| `--data-recovery-on-startup=true` | Facilitates recovery of one or more individual databases and their contents during startup. Replaces `--storage-recover-on-startup` | `[bool]` |
| `--debug-query-plans=false` | Enable DEBUG logging of potential query plans. | `[string]` |
| `--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]` |
| `--flag-file` | Path to the additional configuration file, overrides the default configuration settings. | `[string]` |
| `--help` | Show help on all flags and exit. The default values is `false`. | `[bool]` |
Expand Down
5 changes: 5 additions & 0 deletions pages/database-management/logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ You can check the log level by running `SHOW DATABASE SETTING "log.level";` quer
To access the logs from the Memgraph Lab interface, make sure to expose the port
7444 when starting Memgraph with Docker.

<Callout type="info">
To get additional information on the generated query plans, set
`--debug-query-plans` to `True`, along with `--log-level` set to `DEBUG` or `TRACE`.
</Callout>

## Access logs

If you installed Memgraph with Linux, logs can be found in the
Expand Down
5 changes: 5 additions & 0 deletions pages/querying/best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ nonsense or sales pitch, just tech.
/>
</Cards>

To prepare the information we need to help you debug the issue, it is best to
have `--log-level` set to `TRACE` along with the `--debug-query-plans` set to `True`.
That will provide better diagnostics to identify poor cost modelling over
generated plans and hence poor plan selection.

## How to speed up query execution

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