1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Adjust display of actual runtimes in EXPLAIN output to use three fractional

digits, and label it 'ms' not 'msec', for consistency with psql's \timing
display.  Per recent discussions.
This commit is contained in:
Tom Lane
2003-10-17 01:14:26 +00:00
parent fa2356a1ac
commit fe1b5034dd
3 changed files with 12 additions and 12 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994-5, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.116 2003/09/25 18:58:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.117 2003/10/17 01:14:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -270,7 +270,7 @@ ExplainOnePlan(QueryDesc *queryDesc, ExplainStmt *stmt,
if (es->printCost)
{
if (stmt->analyze)
appendStringInfo(str, "Total runtime: %.2f msec\n",
appendStringInfo(str, "Total runtime: %.3f ms\n",
1000.0 * totaltime);
do_text_output_multiline(tstate, str->data);
}
@ -582,7 +582,7 @@ explain_outNode(StringInfo str,
{
double nloops = planstate->instrument->nloops;
appendStringInfo(str, " (actual time=%.2f..%.2f rows=%.0f loops=%.0f)",
appendStringInfo(str, " (actual time=%.3f..%.3f rows=%.0f loops=%.0f)",
1000.0 * planstate->instrument->startup / nloops,
1000.0 * planstate->instrument->total / nloops,
planstate->instrument->ntuples / nloops,