aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regexec.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-02-16 17:33:28 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2012-02-16 17:34:00 -0500
commit4767bc8ff2edc1258cf4d8a83155d4cedd724231 (patch)
tree61ff6eec22f3c512ea1947f57ab7b1a8a14885a2 /src/backend/regex/regexec.c
parent1cc1b91d1b09a5cdd9fc51c9eee31effd2227b4f (diff)
downloadpostgresql-4767bc8ff2edc1258cf4d8a83155d4cedd724231.tar.gz
postgresql-4767bc8ff2edc1258cf4d8a83155d4cedd724231.zip
Improve statistics estimation to make some use of DISTINCT in sub-queries.
Formerly, we just punted when trying to estimate stats for variables coming out of sub-queries using DISTINCT, on the grounds that whatever stats we might have for underlying table columns would be inapplicable. But if the sub-query has only one DISTINCT column, we can consider its output variable as being unique, which is useful information all by itself. The scope of this improvement is pretty narrow, but it costs nearly nothing, so we might as well do it. Per discussion with Andres Freund. This patch differs from the draft I submitted yesterday in updating various comments about vardata.isunique (to reflect its extended meaning) and in tweaking the interaction with security_barrier views. There does not seem to be a reason why we can't use this sort of knowledge even when the sub-query is such a view.
Diffstat (limited to 'src/backend/regex/regexec.c')
0 files changed, 0 insertions, 0 deletions