Conversation
|
Hi @oliness, thanks for the PR. This seems to work well for some queries I've tested (better than |
HNSW and IVFFlat scans return a limited number of tuples, so an ordered index scan chosen for a query that needs every row (no LIMIT) silently returned truncated results. Treat root->tuple_fraction <= 0 like the no-ORDER-BY case in hnswcostestimate and ivfflatcostestimate, unless enable_seqscan is off (the documented way to force an index). Add TAP tests for queries planned with tuple_fraction = 0, including subqueries under an outer aggregate, GROUP BY, HAVING, DISTINCT, ORDER BY or join, and for queries that should still use the index.
a7941e8 to
131ac69
Compare
|
I've added TAP tests for the For queries planned with
They also check that these queries still use the index:
On master, 17 of the 27 checks in each file fail, including every "no index scan" check. The checks for queries that should still use the index pass on master too. |
An HNSW or IVFFlat scan stops after ef_search rows (or the probed lists), so the planner shouldn't pick one for a query that needs every row.