Skip to content

Commit 87ab81e

Browse files
committed
Simplify SQL statement
1 parent db95f2e commit 87ab81e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

balancer/provider/balancer.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ func (b *BalancerImpl) getStatsByKeyRange(ctx context.Context, shard *ShardMetri
238238
comment_keys->>'key_range_id' AS key_range_id,
239239
SUM(user_time + system_time) AS cpu
240240
FROM (
241-
SELECT *
242-
FROM pgcs_get_stats_time_interval(now() - interval '%ds', now())
241+
SELECT FROM pgcs_get_stats_time_interval(now() - interval '%ds', now())
243242
WHERE comment_keys->>'key_range_id' IS NOT NULL
244243
) as pg_comment_stats
245244
GROUP BY key_range_id;

0 commit comments

Comments
 (0)