pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adnan DURSUN <a_dursun@hotmail.com>
To: pgsql-performance@postgresql.org
To: mliberman@goldpocket.com
Subject: Re: SQL Function Performance
Date: Mon, 13 Feb 2006 23:58:59 +0200
Message-ID: <BAY106-DAV24D1B5423A3C728DADA0FAFA070@phx.gbl> (raw)

>From: Mark Liberman
>Date: 02/13/06 22:09:48
>To: Adnan DURSUN; pgsql-performance@postgresql.org
>Subject: RE: [PERFORM] SQL Function Performance

>I've run into this issue. It basically comes down to the plan that is being used inside the function is not the same as the plan used when you issue the query manually >outside of the function.  Although I'm no expert on when plans are prepared and re-evaluated for functions, I know that they are not re-evaluated each time to execute the >function.


 in my case; both direct query and sql function gererate same execution plan. Also, execution plan belongs to the sql function better than direct sql query plan. But, direct sql result comes less than 1 second. sql function result comes about in 50 seconds.

Adnan DURSUN
ASRIN Biliþim Ltd.Þti

view thread (16+ messages)  latest in thread

Message-ID: <BAY106-DAV24D1B5423A3C728DADA0FAFA070@phx.gbl>
Permalink:  ../BAY106-DAV24D1B5423A3C728DADA0FAFA070@phx.gbl/
Also on:    postgresql.org/message-id/BAY106-DAV24D1B5423A3C728DADA0FAFA070@phx.gbl

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: a_dursun@hotmail.com, mliberman@goldpocket.com
  Subject: Re: SQL Function Performance
  In-Reply-To: <BAY106-DAV24D1B5423A3C728DADA0FAFA070@phx.gbl>
  References: <BAY106-DAV24D1B5423A3C728DADA0FAFA070@phx.gbl>

* 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