Re: Actual Cost

2019-02-17 Thread Donald Dong
On Feb 17, 2019, at 11:05 AM, Donald Dong wrote: > > On Feb 17, 2019, at 10:56 AM, Tom Lane wrote: >> Perhaps, but refactoring to get that seems impractically invasive & >> expensive, since e.g. index AM cost estimate functions would have to >> be redefined, plus we'd have to carry around some k

Re: Actual Cost

2019-02-17 Thread Justin Pryzby
On Sun, Feb 17, 2019 at 11:29:56AM -0500, Jeff Janes wrote: > What would I find very useful is [...] an rusage report rather than just > wall-clock duration. Most of that's available; [pryzbyj@database ~]$ psql postgres -xtc "SET client_min_messages=log; SET log_statement_stats=on" -c 'SELECT ma

Re: Actual Cost

2019-02-17 Thread Donald Dong
On Feb 17, 2019, at 10:56 AM, Tom Lane wrote: > Perhaps, but refactoring to get that seems impractically invasive & > expensive, since e.g. index AM cost estimate functions would have to > be redefined, plus we'd have to carry around some kind of cost vector > rather than single numbers for every

Re: Actual Cost

2019-02-17 Thread Tom Lane
Jeff Janes writes: > What would I find very useful is a verbosity option to get the cost > estimates expressed as a multiplier of each *_cost parameter, rather than > just as a scalar. Perhaps, but refactoring to get that seems impractically invasive & expensive, since e.g. index AM cost estimate

Re: Actual Cost

2019-02-17 Thread Jeff Janes
On Sat, Feb 16, 2019 at 10:33 PM Donald Dong wrote: > On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: > > > > On 2/17/19 3:40 AM, David Fetter wrote: > >> > >> As someone not volunteering to do any of the work, I think it'd be a > >> nice thing to have. How large an effort would you guess it wo

Re: Actual Cost

2019-02-17 Thread Tomas Vondra
On 2/17/19 7:45 AM, Donald Dong wrote: > On Feb 16, 2019, at 9:31 PM, Tom Lane wrote: >> >> Donald Dong writes: >>> On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: I don't quite understand what is meant by "actual cost metric" and/or how is that different from running EXPLAIN ANALYZE.

Re: Actual Cost

2019-02-16 Thread Donald Dong
On Feb 16, 2019, at 9:31 PM, Tom Lane wrote: > > Donald Dong writes: >> On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: >>> I don't quite understand what is meant by "actual cost metric" and/or >>> how is that different from running EXPLAIN ANALYZE. > >> Here is an example: > >> Hash Join (c

Re: Actual Cost

2019-02-16 Thread Tom Lane
Donald Dong writes: > On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: >> I don't quite understand what is meant by "actual cost metric" and/or >> how is that different from running EXPLAIN ANALYZE. > Here is an example: > Hash Join (cost=3.92..18545.70 rows=34 width=32) (actual cost=3.92..1850

Re: Actual Cost

2019-02-16 Thread Donald Dong
On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: > > On 2/17/19 3:40 AM, David Fetter wrote: >> >> As someone not volunteering to do any of the work, I think it'd be a >> nice thing to have. How large an effort would you guess it would be >> to build a proof of concept? > > I don't quite unders

Re: Actual Cost

2019-02-16 Thread Tomas Vondra
On 2/17/19 3:40 AM, David Fetter wrote: > On Sat, Feb 16, 2019 at 03:10:44PM -0800, Donald Dong wrote: >> Hi, >> >> When explaining a query, I think knowing the actual rows and pages >> in addition to the operation type (e.g seqscan) would be enough to >> calculate the actual cost. The actual cost

Re: Actual Cost

2019-02-16 Thread David Fetter
On Sat, Feb 16, 2019 at 03:10:44PM -0800, Donald Dong wrote: > Hi, > > When explaining a query, I think knowing the actual rows and pages > in addition to the operation type (e.g seqscan) would be enough to > calculate the actual cost. The actual cost metric could be useful > when we want to look