1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-10 14:22:35 +03:00

When dealing with multiple grouping columns coming from the same table,

clamp the estimated number of groups to table row count over 10, instead
of table row count; this reflects a heuristic that people probably won't
group over a near-unique set of columns, and the knowledge that we don't
currently have any way to estimate the correlation of the columns better
than guessing.  This change creates a trivial plan change in one of the
regression tests.
This commit is contained in:
Tom Lane
2005-01-28 20:34:27 +00:00
parent 0bf2587df4
commit 875b0c62fa
2 changed files with 27 additions and 10 deletions

View File

@@ -134,11 +134,11 @@ SELECT '' AS five, f1 AS "Correlated Field"
WHERE f3 IS NOT NULL);
five | Correlated Field
------+------------------
| 2
| 3
| 1
| 2
| 3
| 2
| 2
(5 rows)
--