Commit 5eced96f authored by Bruce Momjian's avatar Bruce Momjian

Update FAQ.

parent cfe26c0f
...@@ -229,14 +229,12 @@ ...@@ -229,14 +229,12 @@
The bugs mailing list is available. To subscribe to this list, send The bugs mailing list is available. To subscribe to this list, send
email to pgsql-bugs-request@PostgreSQL.org with a body of: email to pgsql-bugs-request@PostgreSQL.org with a body of:
subscribe subscribe
end end
There is also a developers discussion mailing list available. To There is also a developers discussion mailing list available. To
subscribe to this list, send email to subscribe to this list, send email to
pgsql-hackers-request@PostgreSQL.org with a body of: pgsql-hackers-request@PostgreSQL.org with a body of:
subscribe subscribe
end end
...@@ -964,19 +962,19 @@ BYTEA bytea variable-length byte array (null-safe) ...@@ -964,19 +962,19 @@ BYTEA bytea variable-length byte array (null-safe)
4.22) How do I create a column that will default to the current time? 4.22) How do I create a column that will default to the current time?
Use now(): Use now():
CREATE TABLE test (x int, modtime timestamp DEFAULT now() ); CREATE TABLE test (x int, modtime timestamp DEFAULT now() );
4.23) Why are my subqueries using IN so slow? 4.23) Why are my subqueries using IN so slow?
Currently, we join subqueries to outer queries by sequentially Currently, we join subqueries to outer queries by sequentially
scanning the result of the subquery for each row of the outer query. A scanning the result of the subquery for each row of the outer query. A
workaround is to replace IN with EXISTS: workaround is to replace IN with EXISTS:
SELECT * SELECT *
FROM tab FROM tab
WHERE col1 IN (SELECT col2 FROM TAB2) WHERE col1 IN (SELECT col2 FROM TAB2)
to: to:
SELECT * SELECT *
FROM tab FROM tab
WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2) WHERE EXISTS (SELECT col2 FROM TAB2 WHERE col1 = col2)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment