aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-09-11 23:12:31 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-09-11 23:12:31 +0000
commit8ff2005c6754efeab309fcccb756c5de1423f21e (patch)
tree6efa9c13653b42e7c28187ce3aee3805438e34ac
parent47c7f9ef1ccc9e3bc1c9e0b806bd0cd35799a6ed (diff)
downloadpostgresql-8ff2005c6754efeab309fcccb756c5de1423f21e.tar.gz
postgresql-8ff2005c6754efeab309fcccb756c5de1423f21e.zip
Message in the other exit from acquire_sample_rows(), as per update
from Mark Kirkwood. Also show the sample size.
-rw-r--r--src/backend/commands/analyze.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 4c66e672a81..fd93badc556 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -8,7 +8,7 @@
*
*
* 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))
{
*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;
}
@@ -691,9 +697,9 @@ pageloop:;
* Emit some interesting relation info
*/
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),
- onerel->rd_nblocks, tuplesperpage, *totalrows)));
+ onerel->rd_nblocks, numrows, *totalrows)));
return numrows;
}