postgresql/src/include
Tom Lane 4767bc8ff2 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.
2012-02-16 17:34:00 -05:00
..
access Assorted comment fixes, mostly just typos, but some obsolete statements. 2012-01-29 19:23:56 -05:00
bootstrap Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
catalog Preserve column names in the execution-time tupledesc for a RowExpr. 2012-02-14 17:34:56 -05:00
commands Add TIMING option to EXPLAIN, to allow eliminating of timing overhead. 2012-02-07 11:23:04 -05:00
datatype Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
executor Preserve column names in the execution-time tupledesc for a RowExpr. 2012-02-14 17:34:56 -05:00
foreign Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
lib Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
libpq Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
mb Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nodes Preserve column names in the execution-time tupledesc for a RowExpr. 2012-02-14 17:34:56 -05:00
optimizer Preserve column names in the execution-time tupledesc for a RowExpr. 2012-02-14 17:34:56 -05:00
parser Allow LEAKPROOF functions for better performance of security views. 2012-02-13 22:21:14 -05:00
port Support for building with MS Visual Studio 2010. 2012-01-03 08:44:26 -05:00
portability Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postmaster Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
regex Teach regular expression operators to honor collations. 2011-04-10 18:03:09 -04:00
replication Various minor comments changes from bgwriter to checkpointer. 2012-01-30 14:34:25 +00:00
rewrite Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
snowball Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
storage Rename LWLockWaitUntilFree to LWLockAcquireOrWait. 2012-02-08 09:17:13 +02:00
tcop Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
tsearch Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
utils Improve statistics estimation to make some use of DISTINCT in sub-queries. 2012-02-16 17:34:00 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
fmgr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
funcapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getaddrinfo.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getopt_long.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Fix server header file installation with vpath builds 2011-11-10 20:52:54 +02:00
miscadmin.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pg_config_manual.h Use LWSYNC in place of SYNC/ISYNC in PPC spinlocks, where possible. 2012-01-02 00:02:02 -05:00
pg_config.h.in Support fls(). 2012-02-07 13:45:46 -05:00
pg_config.h.win32 Remove support for on_exit() 2011-12-27 20:57:59 +02:00
pg_trace.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pgstat.h Add deadlock counter to pg_stat_database 2012-01-26 15:58:19 +01:00
pgtime.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
port.h Support fls(). 2012-02-07 13:45:46 -05:00
postgres_ext.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
postgres_fe.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postgres.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
rusagestub.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
windowapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00