Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XEeIg-0001BR-8d for pgsql-sql@arkaria.postgresql.org; Tue, 05 Aug 2014 12:57:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEeIf-0002af-Mu for pgsql-sql@arkaria.postgresql.org; Tue, 05 Aug 2014 12:57:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEeIe-0002YM-8k for pgsql-sql@postgresql.org; Tue, 05 Aug 2014 12:57:08 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEeIZ-0005Zn-Ie for pgsql-sql@postgresql.org; Tue, 05 Aug 2014 12:57:06 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by gateway1.nyi.internal (Postfix) with ESMTP id 39E762283B for ; Tue, 5 Aug 2014 08:56:49 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Tue, 05 Aug 2014 08:56:49 -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=Ukr9Zy61eKO5KpzYXhKoiwuKXgI=; b=VjQ4mvTwr0WBpp5apnMf+5S1cCzl tUQ5vzhrD+W4d6ZgCg7gPg6FTowenV9WQflq4pKO7mCMLjno3W8RYJV8Nny+viKP mrnlHlrTniS2BaCODyF2vpQjxyjT8D6WJPSMjEV8b2HaLAOueN//2QzGHlkR9uCm WB2cZswN4N5uX30= 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=Ukr9Zy61eKO5KpzYXhKoiw uKXgI=; b=Eb4I3t8WMI2UGoTeFmRbVn4tsBu+kQzCKY/2F2AL08ub/w3yXk6sqh 9JTT5zsNczl2RMsJ/0BtKgb6juLnGzCJ4inqm5UCNQlrm7Q2/tJSInrtl8M8vykJ VxBsanpio6KA0IALGI+VqlgAYxHyRCk4oVRPXEih96tAfTp38tEtY= X-Sasl-enc: VE4u4dleGpjRzur7/ie+N1OPEroyhovZoeMDnxYrBF8M 1407243408 Received: from panda.site (unknown [174.21.176.242]) by mail.messagingengine.com (Postfix) with ESMTPA id BA7A2C00005; Tue, 5 Aug 2014 08:56:48 -0400 (EDT) Message-ID: <53E0D48F.9060107@aklaver.com> Date: Tue, 05 Aug 2014 05:56:47 -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 ? More information would be helpful. For now I am guessing in your application you are using ODBC to connect to the server, correct? This is an additional step not found in the pgAdmin route which may be a clue. More questions: 1) What does the function do? 2) Where are the database and pgAdmin and the application in relation to each other? In other words are they on the same machine or are they going across a network? 3) What is the application? > > 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