Skip to content
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
6 changes: 6 additions & 0 deletions tests/integration/sql/test_compiled_write_loop_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
On Postgres the MERGE is timed with the edge table vacuumed while empty, as autovacuum leaves it late in a full run:
its per-row read is then a Seq Scan, so it is quadratic (#420). A vacuum doesn't always leave statistics that say
empty (one run took 2.4 s over 20,000 rows, not 27 s), so the case is an xfail allowed to pass until #420 is fixed.
The CALL…RETURN joins its one-row list to the node table for each row, and Postgres, which takes the list for 100
rows, may scan every node for it instead (liberation-data/drivine4j#609): 36.8 s over 20,000 rows in one CI run. It
too is an xfail allowed to pass, until #420 is fixed.
"""

import time
Expand Down Expand Up @@ -104,6 +107,9 @@ async def test_a_write_over_ten_times_the_rows_takes_about_ten_times_as_long_not
if vacuumed_empty(pm, write):
reason = "#420: with the edge table vacuumed empty, a compiled MERGE's per-row read is a Seq Scan on Postgres."
request.applymarker(pytest.mark.xfail(strict=False, reason=reason))
if pm.type == DatabaseType.POSTGRES and write.name == "CALL…RETURN":
reason = "#420: a CALL's one-row list joined to the node table may be planned as a Seq Scan on Postgres."
request.applymarker(pytest.mark.xfail(strict=False, reason=reason))
if store not in TIMES:
try:
TIMES[store] = (await timed(pm, SMALL), await timed(pm, LARGE))
Expand Down
6 changes: 6 additions & 0 deletions tests/sync_integration/sql/test_compiled_write_loop_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
On Postgres the MERGE is timed with the edge table vacuumed while empty, as autovacuum leaves it late in a full run:
its per-row read is then a Seq Scan, so it is quadratic (#420). A vacuum doesn't always leave statistics that say
empty (one run took 2.4 s over 20,000 rows, not 27 s), so the case is an xfail allowed to pass until #420 is fixed.
The CALL…RETURN joins its one-row list to the node table for each row, and Postgres, which takes the list for 100
rows, may scan every node for it instead (liberation-data/drivine4j#609): 36.8 s over 20,000 rows in one CI run. It
too is an xfail allowed to pass, until #420 is fixed.
"""

import time
Expand Down Expand Up @@ -106,6 +109,9 @@ def test_a_write_over_ten_times_the_rows_takes_about_ten_times_as_long_not_a_hun
if vacuumed_empty(pm, write):
reason = "#420: with the edge table vacuumed empty, a compiled MERGE's per-row read is a Seq Scan on Postgres."
request.applymarker(pytest.mark.xfail(strict=False, reason=reason))
if pm.type == DatabaseType.POSTGRES and write.name == "CALL…RETURN":
reason = "#420: a CALL's one-row list joined to the node table may be planned as a Seq Scan on Postgres."
request.applymarker(pytest.mark.xfail(strict=False, reason=reason))
if store not in TIMES:
try:
TIMES[store] = (timed(pm, SMALL), timed(pm, LARGE))
Expand Down
Loading