mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-27 04:47:18 +02:00
The locution "EXISTS(SELECT ... LIMIT 1)" seems to be rather common among people who don't realize that the database already performs optimizations equivalent to putting LIMIT 1 in the sub-select. Unfortunately, this was actually making things worse, because it prevented us from optimizing such EXISTS clauses into semi or anti joins. Teach simplify_EXISTS_query() to suppress constant-positive LIMIT clauses. That fixes the semi/anti-join case, and may help marginally even for cases that have to be left as sub-SELECTs. Marti Raudsepp, reviewed by David Rowley |
||
---|---|---|
.. | ||
data | ||
expected | ||
input | ||
output | ||
sql | ||
.gitignore | ||
GNUmakefile | ||
Makefile | ||
parallel_schedule | ||
pg_regress_main.c | ||
pg_regress.c | ||
pg_regress.h | ||
README | ||
regress.c | ||
regressplans.sh | ||
resultmap | ||
serial_schedule | ||
standby_schedule |
Documentation concerning how to run these regression tests and interpret the results can be found in the PostgreSQL manual, in the chapter "Regression Tests".