Re: jdbc driver performance TODO

Поиск
Список
Период
Сортировка
Искать
От
Kris Jurka
Тема
Re: jdbc driver performance TODO
Дата
Msg-id
Pine.BSO.4.63.0610311428220.12111@leary2.csoft.net
Ответ на
Список
Дерево обсуждения
jdbc driver performance TODO "Simon Riggs" <simon@2ndquadrant.com>
Re: jdbc driver performance TODO "Bucky Jordan" <bjordan@lumeta.com>
Re: jdbc driver performance TODO Julien Patrouix <jpatroui@genoscope.cns.fr>
Re: jdbc driver performance TODO Kris Jurka <books@ejurka.com>
Re: jdbc driver performance TODO "Strong, David" <david.strong@unisys.com>
Re: jdbc driver performance TODO Kris Jurka <books@ejurka.com>
Re: jdbc driver performance TODO "Simon Riggs" <simon@2ndquadrant.com>
Re: jdbc driver performance TODO Tom Lane <tgl@sss.pgh.pa.us>


On Tue, 31 Oct 2006, Strong, David wrote:

> Here's an observation about the JDBC driver, but I'm not sure if it's
> practical to implement. After preparing a statement, the driver still
> sends out a describe message either via the sendDescribeStatement () or
> (most likely) the sendDescribePortal () method calls in
> org.postgresql.core.v3.QueryExecutorImpl. However, as the statement has
> been prepared, it's unlikely to change and so the results of the
> sendDescribeXXX () could be requested once and then cached with the
> prepared statement.

I'm not sure how much benefit this will actually produce, but I agree 
there is duplication of work here.

> Of course, if any tables referenced by the query where changed, the
> prepared statement would be caching the original structure. Although,
> I'm not sure how much of a problem this would be as changing a table's
> data types etc. might cause code to break anyway.

Right now it's not a big deal for the driver because plans don't change, 
but for 8.3 there are plans to do prepared query invalidation when 
underlying tables change.  At that point we'd need to detect and refetch 
metadata.  I'm not sure how a client would detect this change.

> I don't see a direct way to turn off the metadata, perhaps I'm missing
> something?
>

Passing the QueryExecutor.QUERY_NO_METADATA flag to the QueryExecutor will 
prevent the describe message from being sent.

Kris Jurka
В списке pgsql-jdbc по дате отправления
От: Kris Jurka
Дата:
От: Tom Lane
Дата:
FAQ