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

Re: Manual vs automatic functionality

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql(at)mohawksoft(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Manual vs automatic functionality
Date: 2005-03-05 17:05:27
Message-ID: 20050305170526.GA70196@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sat, Mar 05, 2005 at 11:05:32AM -0500, pgsql(at)mohawksoft(dot)com wrote:

> Being able to assign "hints" to queries may be able to allow DBAs to tune
> queries in tables who's characteristics are misrepresented by the
> statistics in ANALYZE.

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.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

pgsql-hackers by date

Next:From: AlexDate: 2005-03-05 17:56:16
Subject: Explicit Transaction Priority
Previous:From: pgsqlDate: 2005-03-05 16:05:32
Subject: Manual vs automatic functionality

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