Re: How not to use JDBC (JDBC Performance Scale 15x presentation)

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Stefan Lindner <stefan(dot)lindner(at)visionet(dot)de>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: How not to use JDBC (JDBC Performance Scale 15x presentation)
Date: 2017-03-16 09:47:51
Message-ID: CADK3HHKgJjccL72zqFXVzdCHbwO0Ce1yeQVO4D0daS=ry=q1tg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 16 March 2017 at 04:57, Stefan Lindner <stefan(dot)lindner(at)visionet(dot)de>
wrote:

> Dave,
>
>
>
> I’ve tested both alternatives: setting within JDBC url and with
> <connection-properties> and both seem to work
>

Thanks!

>
>
> But the documentation Christian Bjørnbak pointed to (
> https://jdbc.postgresql.org/documentation/94/connect.html) states
>
>
>
> „The default is zero, meaning that in ResultSet will be fetch all rows at
> once“
>
>
>
> So doing nothing should lead to maximum performance.
>

No, well, can also lead to out of memory errors, and I also suspect there
is still a sweet spot.

Remember fetching all the rows at once will not return right away, so the
user may experience a lag when the fetch is occurring if it is large.

Dave Cramer

davec(at)postgresintl(dot)com
www.postgresintl.com

>
>
> Stefan
>
>
>
> *Von:* davecramer(at)gmail(dot)com [mailto:davecramer(at)gmail(dot)com] *Im Auftrag von
> *Dave Cramer
> *Gesendet:* Donnerstag, 16. März 2017 01:11
> *An:* Stefan Lindner
> *Cc:* List
>
> *Betreff:* Re: [JDBC] How not to use JDBC (JDBC Performance Scale 15x
> presentation)
>
>
>
> Stefan,
>
>
>
> Reading the docs, there is something called connection-property that I
> would expect to be passed to the driver.
>
>
>
> · *<connection-property>* - used to configure the connections
> retrieved from the java.sql.Driver, e.g.
>
> <connection-property name="char.encoding">UTF-8</connection-property>
>
>
>
>
>
> Let me know if that works and I'll update the docs
>
> Dave
>
>
>
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
>
> www.postgresintl.com
>
>
>
> On 15 March 2017 at 18:29, Stefan Lindner <stefan(dot)lindner(at)visionet(dot)de>
> wrote:
>
> Dear Dave,
>
>
>
> how can we control FetchSize in a XML-Style DatasourceDefinition e.g. for
> Wildfly?
>
>
>
> Stefan
>
>
>
> *Von:* pgsql-jdbc-owner(at)postgresql(dot)org [mailto:pgsql-jdbc-owner@
> postgresql.org] *Im Auftrag von *Dave Cramer
> *Gesendet:* Mittwoch, 15. März 2017 22:35
> *An:* Jorge Solórzano
> *Cc:* Vladimir Sitnikov; List
> *Betreff:* Re: [JDBC] How not to use JDBC (JDBC Performance Scale 15x
> presentation)
>
>
>
> please provide feedback, I'm giving the same talk at pgconf in nyc
>
>
>
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
>
> www.postgresintl.com
>
>
>
> On 15 March 2017 at 17:29, Jorge Solórzano <jorsol(at)gmail(dot)com> wrote:
>
> https://github.com/davecramer/presentations
>
>
> Jorge Solórzano
>
>
>
>
>
> On Wed, Mar 15, 2017 at 3:25 PM, Vladimir Sitnikov <
> sitnikov(dot)vladimir(at)gmail(dot)com> wrote:
>
> Is the presentation available online somewhere?
>
>
>
> Vladimir
>
>
>
>
>
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rob Resendez 2017-03-16 20:21:07 jdbc-4.1 v42.0.0 - set client_encoding
Previous Message Stefan Lindner 2017-03-16 08:57:23 Re: How not to use JDBC (JDBC Performance Scale 15x presentation)