pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Mielke <mark@mark.mielke.cc>
To: Gavin M. Roy <gmr@myyearbook.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: SQL Function Slowness, 8.3.0
Date: Wed, 16 Apr 2008 11:14:26 -0400
Message-ID: <480617D2.7070407@mark.mielke.cc> (raw)
In-Reply-To: <af1bce590804160806t58f7da1g50fc697dd9e6ab08@mail.gmail.com>
References: <af1bce590804160806t58f7da1g50fc697dd9e6ab08@mail.gmail.com>

Are you going to post the function? :-)

My PL/PGSQL functions are running fine in 8.3.x.

Cheers,
mark


Gavin M. Roy wrote:
> 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
>


-- 
Mark Mielke <mark@mielke.cc>

view thread (17+ messages)  latest in thread

Message-ID: <480617D2.7070407@mark.mielke.cc>
Permalink:  ../480617D2.7070407@mark.mielke.cc/
Also on:    postgresql.org/message-id/480617D2.7070407@mark.mielke.cc

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mark@mark.mielke.cc, gmr@myyearbook.com
  Subject: Re: SQL Function Slowness, 8.3.0
  In-Reply-To: <480617D2.7070407@mark.mielke.cc>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox