Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3RDPs395424 for ; Fri, 27 Apr 2001 09:25:54 -0400 (EDT) (envelope-from pgsql-general-owner@postgresql.org) Received: from postmaster.enron.com (outbound5.enron.com [192.152.140.9]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3QNGb388157 for ; Thu, 26 Apr 2001 19:16:37 -0400 (EDT) (envelope-from cvernon@enron.com) Received: from mailman.enron.com (mailman.enron.com [192.168.189.66]) by postmaster.enron.com (8.10.1/8.10.1/external_corp-1.08) with ESMTP id f3QNGA625462; Thu, 26 Apr 2001 18:16:10 -0500 (CDT) Received: from dserv1.ect.enron.com (dserv1.ect.enron.com [172.16.1.37]) by mailman.enron.com (8.10.1/8.10.1/corp-1.05) with ESMTP id f3QNG2L10523; Thu, 26 Apr 2001 18:16:04 -0500 (CDT) Received: from WNATRD1007253 (wnatrd-1007253.corp.enron.com [172.16.37.90]) by dserv1.ect.enron.com (8.8.8/8.8.8) with SMTP id SAA27338; Thu, 26 Apr 2001 18:16:02 -0500 (CDT) Message-ID: <00e801c0cea6$dc848820$5a2510ac@corp.enron.com> From: "Clayton Vernon" To: "John Oakes" , "Doug McNaught" Cc: References: Subject: Re: JDBC speed question. Date: Thu, 26 Apr 2001 18:16:02 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Archive-Number: 200104/1143 X-Sequence-Number: 8428 Related question: how do you run postgreSQL to simultaneously support a Unix socket and TCP/IP? ----- Original Message ----- From: "Doug McNaught" To: "John Oakes" Cc: Sent: Thursday, April 26, 2001 5:35 PM Subject: Re: [GENERAL] JDBC speed question. > "John Oakes" writes: > > > Anyone have any ideas how to speed up performance using the JDBC driver? A > > query that takes me 20 seconds to execute from command line takes 1 full > > minute with the jdbc driver. Thanks. > > Since you don't guve any details of your query or network setup, it's > hard to help much. What could account for the difference, assuming > that the query is exactly the same in both cases, is that the JDBC > driver connects through TCP/IP (even when on the same host) whereas > 'psql' will by default connect through a Unix socket. On most > systems, Unix sockets are considerably faster than even local TCP > sockets. If the JDBC client is running on a different machine, the > difference becomes even more pronounced. > > This is assuming that your query is returning a great deal of data, so > the network pipe is a factor in the execution time. If it isn't, then > it's unclear how to help you without more details on your table > layouts and the query itself. > > -Doug > -- > The rain man gave me two cures; he said jump right in, > The first was Texas medicine--the second was just railroad gin, > And like a fool I mixed them, and it strangled up my mind, > Now people just get uglier, and I got no sense of time... --Dylan > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >