Received: from maia.hub.org (unknown [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id F27EB1337B63 for ; Thu, 21 Oct 2010 13:15:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 93171-02 for ; Thu, 21 Oct 2010 16:15:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lpo-relay-04.vmsinfo.com (lpo-relay-04.vmsinfo.com [216.169.137.115]) by mail.postgresql.org (Postfix) with ESMTP id A1C021337B47 for ; Thu, 21 Oct 2010 13:15:04 -0300 (ADT) X-IronPort-AV: E=Sophos;i="4.58,218,1286164800"; d="scan'208";a="26431850" Received: from unknown (HELO lpo-mailbox-01.vmsinfo.com) ([216.169.137.251]) by lpo-relay-04.vmsinfo.com with ESMTP; 21 Oct 2010 12:15:03 -0400 Received: from [10.101.43.35] (unknown [216.169.135.235]) by lpo-mailbox-01.vmsinfo.com (Postfix) with ESMTP id A0D2E7D00B; Thu, 21 Oct 2010 12:15:03 -0400 (EDT) Message-ID: <4CC06707.8090809@vmsinfo.com> Date: Thu, 21 Oct 2010 12:15:03 -0400 From: Mladen Gogala Organization: VMS User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Gael Le Mignot CC: "pgsql-performance@postgresql.org" Subject: Re: Periodically slow inserts References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/353 X-Sequence-Number: 40771 Gael Le Mignot wrote: > Hello, > > We are using PostgreSQL for storing data and full-text search indexes > for the webiste of a daily newspaper. We are very happy overall with the > results, but we have one "weird" behaviour that we would like to solve. > > The problem is when we index objects into the full-text search part of > the database (which a DELETE and then an INSERT into a specific table), > the INSERT sometimes take a long time (from 10s to 20s), but the same > insert (and many other similar ones) are fast (below 0.2s). > Have you tried with strace, just to see where the time is spent? -- Mladen Gogala Sr. Oracle DBA 1500 Broadway New York, NY 10036 (212) 329-5251 http://www.vmsinfo.com The Leader in Integrated Media Intelligence Solutions