diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2019-06-27 17:41:29 +0200 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2019-06-27 18:01:54 +0200 |
commit | 69fd82fedd746b82427097883daf2921dd77584e (patch) | |
tree | 4860a0470f93c476e6a329cd5cef12631078d74a /src | |
parent | 050098b14e33a5d3dfabf172ebbddd20c6bb4665 (diff) | |
download | postgresql-69fd82fedd746b82427097883daf2921dd77584e.tar.gz postgresql-69fd82fedd746b82427097883daf2921dd77584e.zip |
Update reference to sampling algorithm in analyze.c
Commit 83e176ec1 moved row sampling functions from analyze.c to
utils/misc/sampling.c, but failed to update comment referring to
the sampling algorithm from Jeff Vitter's paper. Correct the
comment by pointing to utils/misc/sampling.c.
Author: Etsuro Fujita
Discussion: https://postgr.es/m/CAPmGK154gp%2BQd%3DcorQOv%2BPmbyVyZBjp_%2Bhb766UJeD1e_ie6XQ%40mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/commands/analyze.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 6cb545c1265..d7004e53138 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -1048,13 +1048,13 @@ acquire_sample_rows(Relation onerel, int elevel, * The first targrows sample rows are simply copied into the * reservoir. Then we start replacing tuples in the sample until * we reach the end of the relation. This algorithm is from Jeff - * Vitter's paper (see full citation below). It works by - * repeatedly computing the number of tuples to skip before - * selecting a tuple, which replaces a randomly chosen element of - * the reservoir (current set of tuples). At all times the - * reservoir is a true random sample of the tuples we've passed - * over so far, so when we fall off the end of the relation we're - * done. + * Vitter's paper (see full citation in utils/misc/sampling.c). It + * works by repeatedly computing the number of tuples to skip + * before selecting a tuple, which replaces a randomly chosen + * element of the reservoir (current set of tuples). At all times + * the reservoir is a true random sample of the tuples we've + * passed over so far, so when we fall off the end of the relation + * we're done. */ if (numrows < targrows) rows[numrows++] = ExecCopySlotHeapTuple(slot); |