gp与 pg 查询进程

select now()-query_start as cost_time,* from pg_stat_activity where current_query not in ( '<IDLE>','<insufficient privilege>') and waiting='f'
order by waiting,cost_time DESC;
原文地址:https://www.cnblogs.com/jackicalSong/p/8383991.html