Re: Prepared statements and suboptimal plans

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Prepared statements and suboptimal plans
Дата
Msg-id CAHyXU0wgAVccv_NX7y0xekV3rPtm8ithNb4xYHYQGjA7oWF7qQ@mail.gmail.com
обсуждение исходный текст
Ответ на Prepared statements and suboptimal plans  (Royce Ausburn <esapersona@royce.id.au>)
Список pgsql-performance
On Tue, Sep 20, 2011 at 5:44 PM, Royce Ausburn <esapersona@royce.id.au> wrote:
> Hi all,
> It looks like I've been hit with this well known issue.  I have
> a complicated query that is intended to run every few minutes, I'm using
> JDBC's Connection.prepareStatement() mostly for nice parameterisation, but
> postgres produces a suboptimal plan due to its lack of information when the
> statement is prepared.

Postgres has gotten incrementally smarter about this, but at the end
of the day it's just working under what the jdbc driver is telling it
what to do.  One thing you can do is disable sever-side prepared
statements with the prepareThreshold=0 decoration to the jdbc url give
that a whirl and see how it turns out.

merlin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Shaun Thomas
Дата:
Сообщение: Re: REINDEX not working for wastedspace
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Constraint exclusion on UNION ALL subqueries with WHERE conditions