Re: Prepared Statement Query Planning - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Prepared Statement Query Planning
Date
Msg-id 25520.1251557565@sss.pgh.pa.us
Whole thread Raw
In response to Re: Prepared Statement Query Planning  (Brett Henderson <brett@bretth.com>)
Responses Re: Prepared Statement Query Planning  (Brett Henderson <brett@bretth.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Brett Henderson
Date:
Subject: Re: Prepared Statement Query Planning
Next
From: Віталій Тимчишин
Date:
Subject: Re: Prepared Statement Query Planning