aboutsummaryrefslogtreecommitdiff
path: root/weed/command/sql.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command/sql.go')
-rw-r--r--weed/command/sql.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/command/sql.go b/weed/command/sql.go
index adc2ad52b..682c8e46d 100644
--- a/weed/command/sql.go
+++ b/weed/command/sql.go
@@ -408,7 +408,8 @@ func executeAndDisplay(ctx *SQLContext, query string, showTiming bool) bool {
}
// Show execution time for interactive/table mode
- if showTiming && ctx.outputFormat == OutputTable {
+ // Only show timing if there are columns or if result is truly empty
+ if showTiming && ctx.outputFormat == OutputTable && (len(result.Columns) > 0 || len(result.Rows) == 0) {
elapsed := time.Since(startTime)
fmt.Printf("\n(%d rows in set, %.3f sec)\n\n", len(result.Rows), elapsed.Seconds())
}