From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brett Henderson <brett@bretth.com>
Cc: Віталій Тимчишин <tivv00@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statement Query Planning
Date: Sat, 29 Aug 2009 10:52:45 -0400
Message-ID: <25520.1251557565@sss.pgh.pa.us> (raw)
In-Reply-To: <4A98DDE4.4060509@bretth.com>
References: <4A9892E5.4010509@bretth.com>
<331e40660908282327y22c4e6d7wc4e6f69337d08a9f@mail.gmail.com>
<4A98DDE4.4060509@bretth.com>
Brett Henderson <brett@bretth.com> writes:
> However I don't think it will work in my case. I currently have three
> different ways of selecting records, 1. by timestamp range (as in my
> initial example), 2. by records in a temp table, and 3. unrestricted.
> The unrestricted example isn't an issue because a full table scan is
> appropriate in that case. However the temp table one is a different
> matter.
In the case of a temp table you have to ANALYZE the temp table after
filling it; otherwise the planner is working completely blind as to
what is in it. (autovacuum will not do this for you...)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, brett@bretth.com, tivv00@gmail.com
Subject: Re: Prepared Statement Query Planning
In-Reply-To: <25520.1251557565@sss.pgh.pa.us>
References: <4A9892E5.4010509@bretth.com> <331e40660908282327y22c4e6d7wc4e6f69337d08a9f@mail.gmail.com> <4A98DDE4.4060509@bretth.com> <25520.1251557565@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox