使用命令: \timing
postgres=# \timing
Timing is on.
postgres=#
postgres=# select * from tb4 where name is not null;
id | name
----+------
10 | john
9 | john
8 | john
7 | john
6 | john
5 | john
4 | john
3 | john
2 | john
1 | john
(10 rows)
Time: 0.574 ms postgres=#