Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 1983BC32C71 for ; Fri, 23 Mar 2012 09:26:36 -0300 (ADT) Received: from rs133.luxsci.com ([72.32.115.26]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SB3Zg-0008MS-A5 for pgsql-performance@postgresql.org; Fri, 23 Mar 2012 12:26:35 +0000 Received: from GNANAM (NSG-Static-233.156.72.182.airtel.in [182.72.156.233] (may be forged)) (authenticated bits=0) by rs133.luxsci.com (8.13.8/8.13.8) with ESMTP id q2NCPwpC030711; Fri, 23 Mar 2012 07:26:10 -0500 Reply-To: From: "Gnanakumar" To: "'Tomas Vondra'" Cc: "'Merlin Moncure'" , "'Kevin Grittner'" , References: <006301cd07fd$358ebe40$a0ac3ac0$@com> <4F6AFB5902000025000465C7@gw.wicourts.gov> <006c01cd08dd$205af940$6110ebc0$@com> <6df55552430e183a729aa039ff729f06.squirrel@sq.gransy.com> In-Reply-To: <6df55552430e183a729aa039ff729f06.squirrel@sq.gransy.com> Subject: Re: Write workload is causing severe slowdown in Production Date: Fri, 23 Mar 2012 17:55:37 +0530 Organization: Zoniac Software Private Limited Message-ID: <00a501cd08f0$11385490$33a8fdb0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac0I3y2jsz/mI0MSQNyhdZU3L2bSMAAEDy3w Content-Language: en-us X-Lux-Comment: Message q2NCPwpC030711 sent by user #22393 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/161 X-Sequence-Number: 46611 > Are those wrapped in a transaction or not? Each transaction forces a = fsync > when committing, and if each of those INSERT/UPDATE statements stands = on > it's own it may cause of lot of I/O. Yes, it's wrapped inside a transaction. May be this could be a reason = for slowdown, as you've highlighted here. Atleast, we've got some = guidance here to troubleshoot in this aspect also. > There are tools that claim to remove the object vs. relational = discrepancy > when accessing the database. They often generate queries on the fly, = and > some of the queries are pretty awful (depends on how well the ORM = model is > defined). There are various reasons why this may suck - loading too = much > data, using lazy fetch everywhere etc. Thanks for the clarification. > Are you using something like Hibernate, JPA, ... to handle = persistence? No, we're not using any persistence frameworks/libraries as such.