Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XEeNZ-0001LY-HI for pgsql-sql@arkaria.postgresql.org; Tue, 05 Aug 2014 13:02:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEeNY-0003tV-WA for pgsql-sql@arkaria.postgresql.org; Tue, 05 Aug 2014 13:02:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEeNT-0003tO-Bz for pgsql-sql@postgresql.org; Tue, 05 Aug 2014 13:02:12 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEeN9-0001fe-TP for pgsql-sql@postgresql.org; Tue, 05 Aug 2014 13:01:54 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by gateway1.nyi.internal (Postfix) with ESMTP id 51315230FC for ; Tue, 5 Aug 2014 09:01:04 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Tue, 05 Aug 2014 09:01:04 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=dGhSXzKzmjdWAnfIBv4bJAEuBC4=; b=UsAjl2ZmG7wfDHHzLNaDyHUB4qzm cJYXGppxuuxmYcGcuXBrfQYH77nfieDToLH7fA/CjrZIpyuIHtu6FzmWaNPI0OII BVWKzrZPW4OOBvZystav/m1Wa6s++532Zi9gLg/1lrEpIHmgQU8VcL7NK/BVjZL9 KAFr2sjyOLUm4Xs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=dGhSXzKzmjdWAnfIBv4bJA EuBC4=; b=LY0fkuwM8jmLGmvVTSLLJv5DFXRcPb0u4WYLCPumHJzBN4wP55rUVY +AqYf5h5kIAOjihQ7EnufWHjZhZDmGOb+Ly0hsTWP+8mgg366F5j7Oay5suJ9HO+ g6pBia4yObv58zEQhjBz63BZ/OLGJQY8y8BnlNNfU+6DIhq4NYzWc= X-Sasl-enc: u2GCBIKwL6B42wmCjx3pB6ZX8N+b3p90PDtmwOf8qbbd 1407243663 Received: from panda.site (unknown [174.21.176.242]) by mail.messagingengine.com (Postfix) with ESMTPA id 96068C007BF; Tue, 5 Aug 2014 09:01:03 -0400 (EDT) Message-ID: <53E0D58E.9040502@aklaver.com> Date: Tue, 05 Aug 2014 06:01:02 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Marcin Krawczyk , "pgsql-sql@postgresql.org" Subject: Re: function call References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 08/05/2014 04:28 AM, Marcin Krawczyk wrote: > Hi list, > > I have a SET returning function (defined as RETURNS TABLE), it takes 2 > parameters and always returns one row with 3 columns. Now when I run it > from pgAdmin it takes around 5 seconds but when I run it from the > application its around 3 minutes (same parameters of course). It shows > up in the postgres' status server and odbc log right away so I believe > the applications has nothing to do with it. Where should I start looking ? Just had another thought. I found in the past that ODBC logging can slow things down considerably. What happens if you turn off the ODBC logging? > > I'm running postgres 9.1 > > > regards > mk -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql