Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 217FB632EBF for ; Fri, 9 Apr 2010 10:36:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27269-07 for ; Fri, 9 Apr 2010 13:36:12 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id D33406329DA for ; Fri, 9 Apr 2010 10:36:12 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id o39Da6YF053027 for ; Fri, 9 Apr 2010 10:36:06 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id o39DK8S9046755 for pgsql-performance@postgresql.org; Fri, 9 Apr 2010 10:20:08 -0300 (ADT) (envelope-from news) From: "Sabin Coanda" X-Newsgroups: pgsql.performance Subject: Re: How check execution plan of a function Date: Fri, 9 Apr 2010 16:18:25 +0300 Organization: Hub.Org Networking Services Lines: 9 Message-ID: References: <4BBDF9C9.9050504@squeakycode.net> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Response To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201004/128 X-Sequence-Number: 38378 I have just a function returning a cursor based on a single coplex query. When I check the execution plan of that query it takes about 3 seconds. Just when it is used inside the function it freezes. This is the problem, and this is the reason I cannot imagine what is happen. Also I tried to recreate the function as it was before when it run in 3 seconds, but I cannot make it to run properly now.