Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > SQL Function Sl...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 17 Topic 3994 of 4154
Post > Topic >>

SQL Function Slowness, 8.3.0

by gmr@[EMAIL PROTECTED] ("Gavin M. Roy") Apr 16, 2008 at 11:06 AM

------=_Part_4061_17570540.1208358395079
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

In 8.3.0, I'm seeing some oddities with SQL functions which I thought were
immune to the planner data restrictions of plpgsql functions and the sort.
 Basically I have a query which executes in 5ms but when wrapped in a SQL
function, takes 500ms.  I've checked all the types passed in to make sure
they match so there is no type conversions taking place in execution.
I'm curious about the validity of my expectation that functions created
with
SQL as the language should be as fast as the straight SQL counterpart. 
I've
previously not run into such an order of magnitude difference in using SQL
functions.  Is this a change of behavior in 8.3 from 8.2?  Without
specific
examples, are there any recommendations on how to speed up these
functions?

Thanks,

Gavin

------=_Part_4061_17570540.1208358395079
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<span class="Apple-style-span" style="border-collapse: collapse; ">In
8.3.0, I&#39;m seeing some oddities with SQL functions which I thought
were immune to the planner data restrictions of plpgsql functions and the
sort. &nbsp;Basically I have a query which executes in 5ms but when
wrapped in a SQL function, takes 500ms. &nbsp;I&#39;ve checked all the
types passed in to make sure they match so there is no type conversions
taking place in execution.<div>
<br></div><div>I&#39;m curious about the validity of my expectation that
functions created with SQL as the language should be as fast as the
straight SQL counterpart. &nbsp;I&#39;ve previously not run into such an
order of magnitude difference in using SQL functions. &nbsp;Is this a
change of behavior in 8.3 from 8.2? &nbsp;Without specific examples, are
there any recommendations on how to speed up these functions?</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Gavin</div><div><br></div></span>

------=_Part_4061_17570540.1208358395079--




 17 Posts in Topic:
SQL Function Slowness, 8.3.0
gmr@[EMAIL PROTECTED] (&  2008-04-16 11:06:35 
Re: SQL Function Slowness, 8.3.0
tgl@[EMAIL PROTECTED] (T  2008-04-16 11:09:47 
Re: SQL Function Slowness, 8.3.0
mark@[EMAIL PROTECTED] (  2008-04-16 11:14:26 
Re: SQL Function Slowness, 8.3.0
gmr@[EMAIL PROTECTED] (&  2008-04-16 14:44:40 
Re: SQL Function Slowness, 8.3.0
tgl@[EMAIL PROTECTED] (T  2008-04-16 16:24:32 
Re: SQL Function Slowness, 8.3.0
jd@[EMAIL PROTECTED] (&q  2008-04-16 11:58:08 
Re: SQL Function Slowness, 8.3.0
simon@[EMAIL PROTECTED]   2008-04-17 17:12:31 
Re: SQL Function Slowness, 8.3.0
tgl@[EMAIL PROTECTED] (T  2008-04-17 12:12:50 
Re: SQL Function Slowness, 8.3.0
simon@[EMAIL PROTECTED]   2008-04-17 17:25:57 
Re: SQL Function Slowness, 8.3.0
tgl@[EMAIL PROTECTED] (T  2008-04-17 12:41:12 
Re: SQL Function Slowness, 8.3.0
craig@[EMAIL PROTECTED]   2008-04-18 01:00:43 
Re: SQL Function Slowness, 8.3.0
alvherre@[EMAIL PROTECTED  2008-04-17 13:15:40 
Re: SQL Function Slowness, 8.3.0
tgl@[EMAIL PROTECTED] (T  2008-04-17 19:38:54 
Re: SQL Function Slowness, 8.3.0
craig@[EMAIL PROTECTED]   2008-04-18 11:41:17 
Re: SQL Function Slowness, 8.3.0
tgl@[EMAIL PROTECTED] (T  2008-04-18 00:01:52 
Re: SQL Function Slowness, 8.3.0
craig@[EMAIL PROTECTED]   2008-04-18 12:21:46 
Re: SQL Function Slowness, 8.3.0
simon@[EMAIL PROTECTED]   2008-04-17 17:50:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 22:31:09 CDT 2008.