Re: query optimization with UDFs

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: query optimization with UDFs
Date: 2006-10-14 09:43:44
Message-ID: 4530B150.8050904@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi, Tom,

Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
>> BTW, I think it would make sense to implement a limited subset of the
>> xfunc ideas: add options to CREATE FUNCTION to allow cost information to
>> be specified, and then take advantage of this information instead of
>> using the existing constant kludges. This would be a tangible
>> improvement, and would have minimal impact on the planner.
>
> The trick is to figure out what a useful parameterized cost model would
> look like. IIRC, the main reason the xfunc code rotted on the vine was
> that its cost parameters didn't seem to be either easy to select or
> powerful in predicting actual cost. We'd have to do better this time.

I don't know what the xfunc people did, but at least for some varlen
data types (Arrays, PostGIS, text), some function costs (concatenation,
GeomUnion etc.) can be estimated via the average field size of the tables.

Has that idea been considered?

HTH,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2006-10-14 13:17:04 Re: problem with using O_DIRECT
Previous Message jef peeraer 2006-10-14 09:17:14 Re: encoding problem

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-10-14 14:47:17 Re: query optimization with UDFs
Previous Message Markus Schaber 2006-10-14 08:35:24 Re: Interface of the R-tree in order to work with postgresql