一条命令测试 pg 查询延迟

· Frytea · 5 分钟 · 技术笔记
一条命令测试 pg 查询延迟
$ apt install postgresql-client
$ time psql "postgresql://xxx:xxxx@x.x.x.x:5432/today_ai_weather" -c "\timing on"  -c "SELECT 1"  
Timing is on.  
?column?    
----------  
       1  
(1 row)  
  
Time: 172.842 ms  
  
real    0m1.063s  
user    0m0.029s  
sys     0m0.020s