2 Commits
Author SHA1 Message Date
binwiederhier 3105128de9 Check generic plans, and split the tail query the same way
The replay query of v2.31.0 only read whole topics in the plan Postgres makes without the
parameter values, which it switches to after a prepared statement has run five times (pgx
prepares statements); with the values, it had found a cheaper plan. The plan tests now check that
generic plan. They found the same problem in the tail read (id > cursor OR id = ANY(holes)): its
generic plan scans the whole message table through the primary key, 700 ms on 3.3M rows in the
lab, on the primary every second. SQLite, which always plans without the values, scanned the whole
table for it too. Both are now two parts joined with UNION ALL.
2026-10-16 19:03:54 +00:00
binwiederhier ee6db15589 Move the query plan tests next to the queries they test
cache_postgres_internal_test.go and cache_sqlite_internal_test.go, the internal companions of
cache_postgres_test.go and cache_sqlite_test.go: the query constants are unexported.
2026-10-16 15:31:45 +00:00