Re: SQL Function Performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
 
-------Original Message-------
 
Date: 02/14/06 23:05:55
Subject: Re: [PERFORM] SQL Function Performance
 
>On Tue, Feb 14, 2006 at 11:33:57AM +0200, Adnan DURSUN wrote:
>>         ->  Nested Loop  (cost=5.90..267.19 rows=3 width=101) (actual time=76.240..30974.777 rows=63193 loops=1)
>>               ->  Nested Loop  (cost=5.90..123.48 rows=26 width=73) (actual time=32.082..4357.786 rows=14296 loops=1)
 
>Absent a better solution, you could write a PL/pgSQL function and
>build the query as a text string, then EXECUTE it.  That would give
>you a new plan each time, one that can take better advantage of
>statistics, at the cost of having to plan the query each time you
>call the function (but you probably don't care about that cost
>as long as the overall results are better).  Here's an example:
 
    Yes, i did it. i wrote a PL/pgSQL function. Now results come at 100 ms.. :-)
I dont like that method but i have to do it for perfomance....
 
Many thanks to everyone who helps...
 
Adnan DURSUN
ASRIN Bilisim Ltd.
Ankara /TURKEY
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux