Skip site navigation (1) Skip section navigation (2)

Re: Prepared Statement Query Planning

From: Brett Henderson <brett(at)bretth(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Віталій Тимчишин <tivv00(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Prepared Statement Query Planning
Date: 2009-08-30 06:16:45
Message-ID: 4A9A194D.9030101@bretth.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Tom Lane wrote:
> Brett Henderson <brett(at)bretth(dot)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.

In response to

pgsql-jdbc by date

Next:From: Brett HendersonDate: 2009-08-30 06:24:43
Subject: Re: Prepared Statement Query Planning
Previous:From: Віталій ТимчишинDate: 2009-08-29 18:05:27
Subject: Re: Prepared Statement Query Planning

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group