Debug updates [skip ci]

This commit is contained in:
Andrew Kane
2024-10-08 22:58:09 -07:00
parent 1d3d0f46ac
commit c0f6570c4a
2 changed files with 8 additions and 3 deletions

View File

@@ -497,14 +497,18 @@ Specify the max number of additional tuples visited
SET hnsw.ef_stream = 10000;
```
The scan will also end if reaches `work_mem`, at which point a notice is shown
The scan will also end if reaches `work_mem`. You can see when this happens by enabling debug messages.
```sql
SET client_min_messages = debug1;
```
```text
NOTICE: hnsw index scan exceeded work_mem after 50000 tuples
DEBUG: hnsw index scan exceeded work_mem after 10000 tuples
HINT: Increase work_mem to scan more tuples.
```
Adjust this with:
If the server has enough memory, you can adjust this with:
```sql
SET work_mem = '8MB';

View File

@@ -58,6 +58,7 @@ foreach ((30000, 50000, 70000))
my ($ret, $stdout, $stderr) = $node->psql("postgres", qq(
SET enable_seqscan = off;
SET hnsw.streaming = on;
SET client_min_messages = debug1;
SET work_mem = '2MB';
SELECT COUNT(*) FROM (SELECT v FROM tst WHERE i % 10000 = 0 ORDER BY v <-> (SELECT v FROM tst LIMIT 1) LIMIT 11) t;
));