Re: Trouble with plan statistics for behaviour for query.

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: Vitalii Tymchyshyn <tivv00(at)gmail(dot)com>
Cc: Trevor Campbell <tcampbell(at)atlassian(dot)com>, Craig James <cjames(at)emolecules(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Trouble with plan statistics for behaviour for query.
Date: 2012-06-01 15:38:10
Message-ID: CAOtHd0Bh+LxwQy70wfr9khrKGbz+umZBQDXYOnLLee4ZJ9e9Pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

> If I am correct, JDBC uses named portal only on the 5th time you use
> PreparedStatement (configurable). Before it uses unnamed thing that should
> work as if you did embed the value.

If this is due to the difference in parameter type information, this
doesn't have anything to do with named portals.

My guess is that the driver has one idea about parameter types (based
on either the specific setTypeFoo call or the Java type of the
parameter passed to setObject), and the server another (based on the
type information of the CHANGEGROUP.ISSUEID column). Actually, I'm
rather surprised to see 'real' there: if you're using setObject with a
Long, I would imagine that turns into a bigint (which I believe the
server knows how to coerce to numeric). Can you show us your JDBC
code?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message utsav 2012-06-01 15:48:03 TYPE TABLE OF NUMBER
Previous Message Bryan Montgomery 2012-06-01 15:28:17 Question: How do you manage version control?

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Rimmer 2012-06-01 15:41:53 Re: Select from sequence in slow query log
Previous Message Tom Lane 2012-06-01 15:15:09 Re: does the query planner consider work_mem?