Re: Prepared statements and generic plans

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'bruce(at)momjian(dot)us'" <bruce(at)momjian(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepared statements and generic plans
Date: 2016-06-07 06:52:15
Message-ID: A737B7A37273E048B164557ADEF4A58B5385A505@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
>> ! distinct column values, a generic plan assumes a column equality
>> ! comparison will match 33% of processed rows. Column statistics
>>
>> ... assumes *that* a column equality comparison will match 33% of *the* processed rows.
>
> Uh, that seems overly wordy. I think the rule is that if the sentence
> makes sense without the words, you should not use them, but it is
> clearly a judgement call in this case. Do you agree?

My gut feeling is that at least the "the" should be retained, but mine
are the guts of a German speaker.
It is clearly a judgement call, so follow your instincts.

> Updated patch attached.
>
> One more thing --- there was talk of moving some of this into chapter
> 66, but as someone already mentioned, there are no subsections there
> because it is a dedicated topic:
>
> 66. How the Planner Uses Statistics.
>
> I am not inclined to add a prepare-only section to that chapter. On the
> other hand, the issues described apply to PREPARE and to protocol-level
> prepare, so having it in PREPARE also seems illogical. However, I am
> inclined to leave it in PREPARE until we are ready to move all of this
> to chapter 66.

I think it would be ok to leave it where it is in your patch; while the
paragraph goes into technical detail, it is still alright in the general
documentation (but only just).

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-06-07 07:18:55 Re: Improve tab completion for USER MAPPING
Previous Message Michael Paquier 2016-06-07 06:23:15 Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116