From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Amarendra Konda <amar(dot)vijaya(at)gmail(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Explain plan changes - IN CLAUSE ( Passing direct values Vs INNER Query ) |
Date: | 2020-05-07 21:21:05 |
Message-ID: | CAKFQuwYp4HEVoMWZY6YHPTESP-8yZdyKkXU5tUoefGgxxb2zXw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-performance |
On Thu, May 7, 2020 at 10:49 AM Amarendra Konda <amar(dot)vijaya(at)gmail(dot)com>
wrote:
> Can you please explain, why it is getting more columns in output, even
> though we have asked for only one column ?
>
>
>
> * Output: pa.process_activity_id, pa.process_activity_type, pa.voice_url,
> pa.process_activity_user_id, pa.app_id, pa.process_instance_id, pa.alias,
> pa.read_by_user, pa.source, pa.label_category_id, pa.label_id,
> pa.csat_response_id, m.process_activity_fragments, pa.created, pa.updated,
> pa.rule_id, pa.marketing_reply_id, pa.delivered_at, pa.reply_fragments,
> pa.status_fragment, pa.internal_meta, pa.interaction_id,
> pa.do_not_translate, pa.should_translate, pa.in_reply_to*
>
Not knowing the source code in this area at all...
I'm pretty sure its because it doesn't matter. The executor retrieves data
"pages", 8k blocks containing multiple records, then extracts specific full
tuples from there. At that point its probably just data pointers being
passed around. Its not until the end that the planner/executor has to
decide which subset of columns to return to the user, or when a new tuple
structure has to be created anyway (say because of joining), maybe, does it
take the effort of constructing a minimally necessary output column set.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-05-07 21:26:08 | Re: Explain plan changes - IN CLAUSE ( Passing direct values Vs INNER Query ) |
Previous Message | github kran | 2020-05-07 21:18:03 | Re: AutoVacuum and growing transaction XID's |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-05-07 21:26:08 | Re: Explain plan changes - IN CLAUSE ( Passing direct values Vs INNER Query ) |
Previous Message | github kran | 2020-05-07 21:18:03 | Re: AutoVacuum and growing transaction XID's |