[Fwd: Re: [DOCS] How the planner uses statistics]

Started by Mark Kirkwoodover 21 years ago5 messagespatches
Jump to latest
#1Mark Kirkwood
mark.kirkwood@catalyst.net.nz

As discussed on -docs.

Attachments:

Re: [DOCS] How the planner uses statistics.emlmessage/rfc822; name="Re: [DOCS] How the planner uses statistics.eml"Download+287-0
perform.sgml.difftext/plain; name=perform.sgml.diffDownload+280-0
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mark Kirkwood (#1)
Re: [Fwd: Re: [DOCS] How the planner uses statistics]

Mark Kirkwood <markir@coretech.co.nz> writes:

As discussed on -docs.

Hmmm ... it strikes me that someone wanting this level of detail
would be better advised to look into the source code. I certainly
wouldn't want to promise that a chunk of documentation like this
will stay up-to-date.

regards, tom lane

#3Mark Kirkwood
mark.kirkwood@catalyst.net.nz
In reply to: Tom Lane (#2)
Re: [Fwd: Re: [DOCS] How the planner uses statistics]

Tom Lane wrote:

Hmmm ... it strikes me that someone wanting this level of detail
would be better advised to look into the source code.

I did wonder about about it being better placed in 'internals'
somewhere, but it seemed to follow on from the 'explain' and 'stats'
sections quite well.

I certainly
wouldn't want to promise that a chunk of documentation like this
will stay up-to-date.

Yeah - that is a concern... no doco is better than wrong doco :-)
Mind you, ISTM that the same objection could be leveled at the 'stats'
section....

best wishes

Mark

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mark Kirkwood (#3)
Re: [Fwd: Re: [DOCS] How the planner uses statistics]

Mark Kirkwood <markir@coretech.co.nz> writes:

Tom Lane wrote:

Hmmm ... it strikes me that someone wanting this level of detail
would be better advised to look into the source code.

I did wonder about about it being better placed in 'internals'
somewhere, but it seemed to follow on from the 'explain' and 'stats'
sections quite well.

The internals section would be a good compromise. ISTM that in the
context of the "performance tips" chapter, all that people really want
to know is that the planner uses the pg_statistic entries to estimate
numbers of matching rows --- just how it goes about it is irrelevant
detail at that point.

regards, tom lane

#5Mark Kirkwood
mark.kirkwood@catalyst.net.nz
In reply to: Tom Lane (#4)
Re: [Fwd: Re: [DOCS] How the planner uses statistics]

Tom Lane wrote:

The internals section would be a good compromise. ISTM that in the
context of the "performance tips" chapter, all that people really want
to know is that the planner uses the pg_statistic entries to estimate
numbers of matching rows --- just how it goes about it is irrelevant
detail at that point.

Yeah, it clearly is internals, now that you mention it .. :-)

The whole 'it can get out of date' thing worries me a bit - however I
guess everything in the internals section is a bit vulnerable to that
(another reason for internals being the place to put it).

Having said that, if it seems that this is really too much like reading
the code to be in the docs at all, then another option is for it to go
to one of the community sites (like varlena), where it could be
(reformatted) and clearly marked as relevant for 7.x and 8.0 only.

best wishes

Mark