Re: Why could GEQO produce plans with lower costs than the standard_join_search?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Donald Dong <xdong(at)csumb(dot)edu>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Why could GEQO produce plans with lower costs than the standard_join_search?
Date: 2019-05-22 18:42:31
Message-ID: 8521.1558550551@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Donald Dong <xdong(at)csumb(dot)edu> writes:
> I find the cost from cheapest_total_path->total_cost is different
> from the cost from queryDesc->planstate->total_cost. What I saw was
> that GEQO tends to form paths with lower
> cheapest_total_path->total_cost (aka the fitness of the children).
> However, standard_join_search is more likely to produce a lower
> queryDesc->planstate->total_cost, which is the cost we get using
> explain.

> I wonder why those two total costs are different? If the total_cost
> from the planstate is more accurate, could we use that instead as the
> fitness in geqo_eval?

You're still asking us to answer hypothetical questions unsupported
by evidence. In what case does that really happen?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-05-22 18:42:54 Re: Teach pg_upgrade test to honor NO_TEMP_INSTALL
Previous Message Tom Lane 2019-05-22 18:39:54 Re: pg_dump throwing "column number -1 is out of range 0..36" on HEAD