Skip site navigation (1) Skip section navigation (2)

Re: Why performance improvement on converting subselect to a function ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Why performance improvement on converting subselect to a function ?
Date: 2003-07-29 21:32:14
Message-ID: 4578.1059514334@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Rajesh Kumar Mallah <mallah(at)trade-india(dot)com> writes:
> Tom Lane wrote:
>> Odd.  Apparently the planner is picking a better plan in the function
>> context than in the subselect context --- which is strange since it
>> ought to have less information.

> [ verbose plan snipped ]

Well, that sure seems to be the same plan.  Curious that the runtime
wasn't about the same.  Perhaps the slow execution of the first query
was a caching effect?  If you alternate trying the query both ways,
does the speed difference persist?

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Mark BronnimannDate: 2003-07-30 02:08:59
Subject: function returning setof performance question
Previous:From: Ron JohnsonDate: 2003-07-29 20:38:35
Subject: Re: Tuning PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group