Re: why do optimizer parameters have to be set manually? - Mailing list pgsql-performance

From Tom Lane
Subject Re: why do optimizer parameters have to be set manually?
Date
Msg-id 22686.1071777380@sss.pgh.pa.us
Whole thread Raw
In response to why do optimizer parameters have to be set manually?  ("Marinos J. Yannikos" <mjy@geizhals.at>)
Responses Re: why do optimizer parameters have to be set manually?
List pgsql-performance
"Marinos J. Yannikos" <mjy@geizhals.at> writes:
> it seems to me that the optimizer parameters (like random_page_cost
> etc.) could easily be calculated and adjusted dynamically be the DB
> backend based on the planner's cost estimates and actual run times for
> different queries. Perhaps the developers could comment on that?

No, they are not that easy to determine.  In particular I think the idea
of automatically feeding back error measurements is hopeless, because
you cannot tell which parameters are wrong.

> I'm not sure how the parameters are used internally (apart from whatever
> "EXPLAIN" shows), but if cpu_operator_cost is the same for all
> operators, this should probably also be adjusted for individual
> operators (I suppose that ">" is not as costly as "~*").

In theory perhaps, but in practice this is far down in the noise in most
situations.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Marinos J. Yannikos"
Date:
Subject: why do optimizer parameters have to be set manually?
Next
From: Christopher Browne
Date:
Subject: Re: why do optimizer parameters have to be set manually?