Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E319564FCFF for ; Thu, 21 Aug 2008 03:59:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34997-02 for ; Thu, 21 Aug 2008 03:59:40 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.190]) by postgresql.org (Postfix) with ESMTP id E480D64FCC2 for ; Thu, 21 Aug 2008 03:59:41 -0300 (ADT) Received: by ti-out-0910.google.com with SMTP id y8so599653tia.5 for ; Wed, 20 Aug 2008 23:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=S+pSiJ7gLz3rpP3xXcDgbFsCikvI8vKZdjU9yfSCqLU=; b=REcCD2WLBWRU4BcDAEfcg0L/egbQrk4g0yDHoVW3oGhcE9ynpf++yhY+HwpKhT/zqO XsNluqOktjw+PgvgHcSKBFO9KQsVM51WrS1Nmw6mcPRpoELM82R9w3KbuqyUNs4n6/Cp 45yCDEHYukcpq6BV7MYQjxnMSIhLv6Gt2OfgA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=M8VMQ+hOmo9lbdAolJthZyv9EI9rbpyM+GStQmCnWmax03TA4uM2yvIjhSJT17OqSM iAtzQnvcU67zIDerCL+zcN7A50N589psUfBl8PUYJvHZvHfeA7/LLSss+HKdlVlhwkII 7iHffELLyrjDYmUsXH1IebPjx3nyNYlm/1XKA= Received: by 10.110.70.5 with SMTP id s5mr1100964tia.55.1219301978516; Wed, 20 Aug 2008 23:59:38 -0700 (PDT) Received: by 10.110.8.20 with HTTP; Wed, 20 Aug 2008 23:59:38 -0700 (PDT) Message-ID: <4478b4ac0808202359p56e866b1xe5665ad9871b8dae@mail.gmail.com> Date: Thu, 21 Aug 2008 12:29:38 +0530 From: "=?WINDOWS-1252?Q?Kranti_K_K_Parisa=99?=" To: "Mark Lewis" Subject: Re: PostgreSQL+Hibernate Performance Cc: pgsql-performance@postgresql.org In-Reply-To: <1219246183.7023.114.camel@archimedes.mir3.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_102278_692997.1219301978487" References: <4478b4ac0808200525ia6eabe8q886ac7fbba53ff05@mail.gmail.com> <1219242910.7023.94.camel@archimedes.mir3.com> <4478b4ac0808200802o12eee842ne98c9bee114e84e6@mail.gmail.com> <1219246183.7023.114.camel@archimedes.mir3.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200808/240 X-Sequence-Number: 31121 ------=_Part_102278_692997.1219301978487 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Mark, We are using DBCP and i found something about pgpool in some forum threads, which gave me queries on it. But I am clear now. On Wed, Aug 20, 2008 at 8:59 PM, Mark Lewis wrote: > Yes, we use connection pooling. As I recall Hibernate ships with c3p0 > connection pooling built-in, which is what we use. We were happy enough > with c3p0 that we ended up moving our other non-hibernate apps over to > it, away from DBCP. > > pgpool does connection pooling at a socket level instead of in a local > library level, so really it's a very different thing. If your app is > the only thing talking to this database, and you don't have a > multi-database configuration, then it will be easier for you to use a > Java-based connection pooling library like c3p0 or DBCP than to use > pgpool. > > -- Mark > > On Wed, 2008-08-20 at 20:32 +0530, Kranti K K Parisa=99 wrote: > > Hi Mark, > > > > Thank you very much for the information. I will analyse the DB > > structure and create indexes on PG directly. > > Are you using any connection pooling like DBCP? or PG POOL? > > > > Regards, KP > > > > > > On Wed, Aug 20, 2008 at 8:05 PM, Mark Lewis > > wrote: > > > > On Wed, 2008-08-20 at 17:55 +0530, Kranti K K Parisa=99 wrote: > > > Hi, > > > > > > Can anyone suggest the performance tips for PostgreSQL using > > > Hibernate. > > > > > > One of the queries: > > > > > > - PostgreSQL has INDEX concept and Hibernate also has Column > > INDEXes. > > > Which is better among them? or creating either of them is > > enough? or > > > need to create both of them? > > > > > > and any more performace aspects ? > > > > > > Hibernate is a library for accessing a database such as > > PostgreSQL. It > > does not offer any add-on capabilities to the storage layer > > itself. So > > when you tell Hibernate that a column should be indexed, all > > that it > > does create the associated PostgreSQL index when you ask > > Hibernate to > > build the DB tables for you. This is part of Hibernate's > > effort to > > protect you from the implementation details of the underlying > > database, > > in order to make supporting multiple databases with the same > > application > > code easier. > > > > So there is no performance difference between a PG index and a > > Hibernate > > column index, because they are the same thing. > > > > The most useful Hibernate performance-tuning advice isn't > > PG-specific at > > all, there are just things that you need to keep in mind when > > developing > > for any database to avoid pathologically bad performance; > > those tips are > > really beyond the scope of this mailing list, Google is your > > friend > > here. > > > > I've been the architect for an enterprise-class application > > for a few > > years now using PostgreSQL and Hibernate together in a > > performance-critical context, and honestly I can't think of > > one time > > that I've been bitten by a PG-specific performance issue (a > > lot of > > performance issues with Hibernate that affected all databases > > though; > > you need to know what you're doing to make Hibernate apps that > > run fast. > > If you do run into problems, you can figure out the actual SQL > > that > > Hibernate is issuing and do the normal PostgreSQL explain > > analyze on it; > > usually caused by a missing index. > > > > -- Mark > > > > > > > > -- > > > > Best Regards > > Kranti Kiran Kumar Parisa > > M: +91 - 9391 - 438 - 738 > > +91 - 9849 - 625 - 625 > > > > > --=20 Best Regards Kranti Kiran Kumar Parisa M: +91 - 9391 - 438 - 738 +91 - 9849 - 625 - 625 ------=_Part_102278_692997.1219301978487 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Thanks Mark,

We are using DBCP and i found somethin= g about pgpool in some forum threads, which gave me queries on it. But I am= clear now.

On Wed, Aug 20, 2008 at 8:59 = PM, Mark Lewis <mark.lewis@mir3.com> wrote:
Yes, we use conne= ction pooling.  As I recall Hibernate ships with c3p0
connection pooling built-in, which is what we use.  We were happy enou= gh
with c3p0 that we ended up moving our other non-hibernate apps over to
it, away from DBCP.

pgpool does connection pooling at a socket level instead of in a local
library level, so really it's a very different thing.  If your app= is
the only thing talking to this database, and you don't have a
multi-database configuration, then it will be easier for you to use a
Java-based connection pooling library like c3p0 or DBCP than to use
pgpool.

-- Mark

On Wed, 2008-08-20 at 20:32 +0530, Kranti K K Parisa=99 wrote:
> Hi Mark,
>
> Thank you very much for the information. I will analyse the DB
> structure and create indexes on PG directly.
> Are you using any connection pooling like DBCP? or PG POOL?
>
> Regards, KP
>
>
> On Wed, Aug 20, 2008 at 8:05 PM, Mark Lewis <mark.lewis@mir3.com>
> wrote:
>
>         On Wed, 2008-08-20 at 17:55 +0530, Kranti = K K Parisa=99 wrote:
>         > Hi,
>         >
>         > Can anyone suggest the performance ti= ps for PostgreSQL using
>         > Hibernate.
>         >
>         > One of the queries:
>         >
>         > - PostgreSQL has INDEX concept and Hi= bernate also has Column
>         INDEXes.
>         > Which is better among them? or creati= ng either of them is
>         enough? or
>         > need to create both of them?
>         >
>         > and any more performace aspects ?
>
>
>         Hibernate is a library for accessing a dat= abase such as
>         PostgreSQL.  It
>         does not offer any add-on capabilities to = the storage layer
>         itself.  So
>         when you tell Hibernate that a column shou= ld be indexed, all
>         that it
>         does create the associated PostgreSQL inde= x when you ask
>         Hibernate to
>         build the DB tables for you.  This is= part of Hibernate's
>         effort to
>         protect you from the implementation detail= s of the underlying
>         database,
>         in order to make supporting multiple datab= ases with the same
>         application
>         code easier.
>
>         So there is no performance difference betw= een a PG index and a
>         Hibernate
>         column index, because they are the same th= ing.
>
>         The most useful Hibernate performance-tuni= ng advice isn't
>         PG-specific at
>         all, there are just things that you need t= o keep in mind when
>         developing
>         for any database to avoid pathologically b= ad performance;
>         those tips are
>         really beyond the scope of this mailing li= st, Google is your
>         friend
>         here.
>
>         I've been the architect for an enterpr= ise-class application
>         for a few
>         years now using PostgreSQL and Hibernate t= ogether in a
>         performance-critical context, and honestly= I can't think of
>         one time
>         that I've been bitten by a PG-specific= performance issue (a
>         lot of
>         performance issues with Hibernate that aff= ected all databases
>         though;
>         you need to know what you're doing to = make Hibernate apps that
>         run fast.
>         If you do run into problems, you can figur= e out the actual SQL
>         that
>         Hibernate is issuing and do the normal Pos= tgreSQL explain
>         analyze on it;
>         usually caused by a missing index.
>
>         -- Mark
>
>
>
> --
>
> Best Regards
> Kranti Kiran Kumar Parisa
> M: +91 - 9391 - 438 - 738
> +91 - 9849 - 625 - 625
>
>



--

Best Re= gards
Kranti Kiran Kumar Parisa
M: +91 - 9391 - 438 - 738
+91 - 9= 849 - 625 - 625

------=_Part_102278_692997.1219301978487--