pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brett Henderson <brett@bretth.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Віталій Тимчишин <tivv00@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statement Query Planning
Date: Sun, 30 Aug 2009 16:16:45 +1000
Message-ID: <4A9A194D.9030101@bretth.com> (raw)
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>

Tom Lane wrote:
> 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...)
>   
Thanks for the tip.  I haven't tried the temp table queries yet.  
They're next.

view thread (9+ messages)  latest in thread

Message-ID: <4A9A194D.9030101@bretth.com>
Permalink:  ../4A9A194D.9030101@bretth.com/
Also on:    postgresql.org/message-id/4A9A194D.9030101@bretth.com

 · 

reply

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: brett@bretth.com, tgl@sss.pgh.pa.us, tivv00@gmail.com
  Subject: Re: Prepared Statement Query Planning
  In-Reply-To: <4A9A194D.9030101@bretth.com>
  References: <4A9892E5.4010509@bretth.com> <331e40660908282327y22c4e6d7wc4e6f69337d08a9f@mail.gmail.com> <4A98DDE4.4060509@bretth.com> <25520.1251557565@sss.pgh.pa.us> <4A9A194D.9030101@bretth.com>

* 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