Re: SQL Function Performance

From: "Adnan DURSUN" <a_dursun(at)hotmail(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>, <mliberman(at)goldpocket(dot)com>
Subject: Re: SQL Function Performance
Date: 2006-02-13 21:58:59
Message-ID: BAY106-DAV24D1B5423A3C728DADA0FAFA070@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>From: Mark Liberman
>Date: 02/13/06 22:09:48
>To: Adnan DURSUN; pgsql-performance(at)postgresql(dot)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

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Liberman 2006-02-13 23:45:13 Re: SQL Function Performance
Previous Message Adnan DURSUN 2006-02-13 20:23:52 Re: SQL Function Performance