Re: Manual vs automatic functionality

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql(at)mohawksoft(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Manual vs automatic functionality
Date: 2005-03-06 03:26:55
Message-ID: 422A787F.7060306@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I wouldn't mind being able to provide hints to the planner. For
> example, I have some set-returning functions that typically return
> 10-100 rows and I usually have a good idea of how many rows a
> particular set of inputs will generate, and sometimes I know other
> characteristics about those rows as well. But the planner, not
> knowing any better, always assumes the functions will return 1000
> rows, which presumably affects the plan, sometimes for the worse.
> Here's an example of a problem I've had:
>
> http://archives.postgresql.org/pgsql-performance/2004-08/msg00236.php
>
> I've wondered if the ability to provide hints about the expected
> output from set-returning functions would be useful.

Hmmm, you could jank that by making a new GUC:

SET expected_srf_rows TO 152;
SELECT * FROM myfunction();

Chris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-03-06 05:17:56 Cost of XLogInsert CRC calculations
Previous Message Vikram Kalsi 2005-03-06 01:24:31 Re: postgreSQL-8.0.1 compilation with icc-8.1 on Itanium-2 gives "error: asm statements not supported"