Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #434

Re: Query slow in function but not in normal query window

From Jasen Betts <jasen@xnet.co.nz>
Newsgroups comp.databases.postgresql
Subject Re: Query slow in function but not in normal query window
Date 2013-01-15 07:39 +0000
Organization Dis (not Dat) Organisation
Message-ID <kd312l$j6d$1@gonzo.reversiblemaps.ath.cx> (permalink)
References <5d79dd44-e7d2-4e65-9661-fb6dd337f610@googlegroups.com>

Show all headers | View raw


On 2013-01-14, ivan.sammut@credorax.com <ivan.sammut@credorax.com> wrote:
> Hi ppl,
>
>   I have a function which returns a number of transactions which fall between 2 dates and when I run this in a normal query window it is quite fast (40 secs maximum). But when I put the same query in a function and the dates are passed to the query as parameters the function will take more than 4 minutes as if the query is not using an indexing. 
>
> Anyone had the same problem or has any idea?

the planner, see "execute"


-- 
⚂⚃ 100% natural

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Query slow in function but not in normal query window ivan.sammut@credorax.com - 2013-01-14 03:39 -0800
  Re: Query slow in function but not in normal query window Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2013-01-14 22:10 +0100
  Re: Query slow in function but not in normal query window Ralf Döblitz <doeblitz@doeblitz.net> - 2013-01-14 18:15 +0000
  Re: Query slow in function but not in normal query window Jasen Betts <jasen@xnet.co.nz> - 2013-01-15 07:39 +0000

csiph-web