Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id B0E709FB88B for ; Fri, 18 May 2007 19:26:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 30367-02 for ; Fri, 18 May 2007 19:26:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from web57106.mail.re3.yahoo.com (web57106.mail.re3.yahoo.com [216.252.111.119]) by postgresql.org (Postfix) with SMTP id 490599FB87B for ; Fri, 18 May 2007 19:26:10 -0300 (ADT) Received: (qmail 930 invoked by uid 60001); 18 May 2007 22:26:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=l0GNQhLeu716qE9v9g0UmZEub0tOcGJb2L5ht9S9QE4lnvhQGCudE5tEXY1GK9c9yXrW/cQ+txqVMOH1LMfYV5dM3Kqm0nHGhnmCQnrXDnGamQUOlY6pC7yxwTmtg7UpjV34KsoCZlLL1gkS8QD/R2eyfijOu0tDNPI6f/FapXQ=; X-YMail-OSG: RSaMLssVM1k62lmrbmNGpVTnNaoCAgD0b8NF6sij466mc7MnT84C.Dcb7V61.6SlqndOpPoc6NmCq74jqAyQoqaUawVuFgP6nfY1YZIlhzdUBTnqlQ_C Received: from [64.237.4.140] by web57106.mail.re3.yahoo.com via HTTP; Fri, 18 May 2007 15:26:08 PDT Date: Fri, 18 May 2007 15:26:08 -0700 (PDT) From: Abu Mushayeed Subject: Re: CPU Intensive query To: Tom Lane Cc: pgsql-performance@postgresql.org In-Reply-To: <3287.1179525064@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1366203089-1179527168=:88510" Content-Transfer-Encoding: 8bit Message-ID: <268362.88510.qm@web57106.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.506 tagged_above=0 required=5 tests=AWL=0.375, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447, HTML_30_40=0.374, HTML_MESSAGE=0.001 X-Spam-Level: * X-Archive-Number: 200705/352 X-Sequence-Number: 24742 --0-1366203089-1179527168=:88510 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit > one of them has suddenly decided to get very slow Is there a way to predict when the system will do this? Also, why would it suddenly go from IO intensive to CPU intensive. Also, this query ran today and it already finished. Today it was IO intensive. Please provide me some direction to this problem. Thanks. Tom Lane wrote: Abu Mushayeed writes: > The query is as follows and it's explain plan is also attached: The query itself seems to be a simple join over not too many rows, so I don't see how it could be taking 24 hours. What I suspect is you're incurring lots and lots of invocations of those user-written functions and one of them has suddenly decided to get very slow. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate --------------------------------- Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. --0-1366203089-1179527168=:88510 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
> one of them has suddenly decided to get very slow
 
Is there a way to predict when the system will do this? Also, why would it suddenly go from IO intensive to CPU intensive.
 
Also, this query ran today and it already finished. Today it was IO intensive.
 
Please provide me some direction to this problem.
 
Thanks.

Tom Lane <tgl@sss.pgh.pa.us> wrote:
Abu Mushayeed writes:
> The query is as follows and it's explain plan is also attached:

The query itself seems to be a simple join over not too many rows, so
I don't see how it could be taking 24 hours. What I suspect is you're
incurring lots and lots of invocations of those user-written functions
and one of them has suddenly decided to get very slow.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel
to find your fit. --0-1366203089-1179527168=:88510--