mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Message in the other exit from acquire_sample_rows(), as per update
from Mark Kirkwood. Also show the sample size.
This commit is contained in:
parent
47c7f9ef1c
commit
8ff2005c67
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.61 2003/09/11 22:59:28 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.62 2003/09/11 23:12:31 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -539,6 +539,12 @@ acquire_sample_rows(Relation onerel, HeapTuple *rows, int targrows,
|
|||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
{
|
{
|
||||||
*totalrows = (double) numrows;
|
*totalrows = (double) numrows;
|
||||||
|
|
||||||
|
ereport(elevel,
|
||||||
|
(errmsg("\"%s\": %u pages, %d rows sampled, %.0f estimated total rows",
|
||||||
|
RelationGetRelationName(onerel),
|
||||||
|
onerel->rd_nblocks, numrows, *totalrows)));
|
||||||
|
|
||||||
return numrows;
|
return numrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -691,9 +697,9 @@ pageloop:;
|
|||||||
* Emit some interesting relation info
|
* Emit some interesting relation info
|
||||||
*/
|
*/
|
||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errmsg("\"%s\": %u pages, %.1f average rows/page in sample, %.0f estimated rows",
|
(errmsg("\"%s\": %u pages, %d rows sampled, %.0f estimated total rows",
|
||||||
RelationGetRelationName(onerel),
|
RelationGetRelationName(onerel),
|
||||||
onerel->rd_nblocks, tuplesperpage, *totalrows)));
|
onerel->rd_nblocks, numrows, *totalrows)));
|
||||||
|
|
||||||
return numrows;
|
return numrows;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user