Re: different queries and their efficiencies - Mailing list pgsql-general

From Tom Lane
Subject Re: different queries and their efficiencies
Date
Msg-id 14747.1132853710@sss.pgh.pa.us
Whole thread Raw
In response to different queries and their efficiencies  (David Welton <davidnwelton@gmail.com>)
List pgsql-general
David Welton <davidnwelton@gmail.com> writes:
> I'm curious as to what the general opinion is on these different
> queries and their relative merits, especially in terms of speed:

You really should do EXPLAIN ANALYZE rather than assuming that the
planner's estimates are reliable.

The NOT IN case, at least, could be improved by increasing work_mem
to the point where the subquery fits into an in-memory hash table.
Larger work_mem would probably help the sorts used in the other
plans too.

            regards, tom lane

pgsql-general by date:

Previous
From: Adam Witney
Date:
Subject: Re: "invalid page header in block 597621 of relation..."error
Next
From: Harald Armin Massa
Date:
Subject: pg_dump --data-only: is dump ordered to keep foreign-key-relations loadable?