Re: Regarding EXPLAIN and width calculations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Regarding EXPLAIN and width calculations
Date: 2010-11-19 18:14:42
Message-ID: 3236.1290190482@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jon Nelson <jnelson+pgsql(at)jamponi(dot)net> writes:
> What influences the calculation of the 'width' value in query plans?

It's generally the sum of the estimated column widths for all the
columns needed at that particular level of the plan.

> Specifically, I have two queries which both query the same set of
> tables via either UNION or UNION ALL based on the presence (or
> absence) of an aggregate function.

Hard to comment about this with such an incomplete view of the situation
--- in particular, data types would be a critical factor, and I also
wonder if you're admitting to all the columns involved.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jon Nelson 2010-11-19 18:31:40 Re: Regarding EXPLAIN and width calculations
Previous Message Tom Lane 2010-11-19 17:54:11 Re: Upgrading 8.2 to 8.4: pg_restore: did not find magic string in file header\n