select
pgss.queryid as "PGSS_QUERYID",
pgss.query as "PGSS_QUERY",
pgsa.query_id as "PGSA_QUERYID",
substring(pgsa.query,
1,
45) as "PGSA_QUERY"
from
pg_stat_statements pgss
join pg_stat_activity pgsa on
pgss.queryid = pgsa.query_id
and pgss.queryid = '2397681704071010949';
PGSS_QUERYID | PGSS_QUERY | PGSA_QUERYID | PGSA_QUERY
---------------------+------------+---------------------+-----------------------------------------------
2397681704071010949 | BEGIN | 2397681704071010949 | select projectper0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select projectper0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | SELECT item_guid, count(item_guid) count FR
2397681704071010949 | BEGIN | 2397681704071010949 | SELECT item_guid, count(item_guid) count FR
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | SELECT distinct ep.role FROM v_project_permis
2397681704071010949 | BEGIN | 2397681704071010949 | SELECT distinct ep.role FROM v_project_permis
2397681704071010949 | BEGIN | 2397681704071010949 | select this_.CONTACT_SID as CONTACT1_362_1_,
2397681704071010949 | BEGIN | 2397681704071010949 | select this_.CONTACT_SID as CONTACT1_362_1_,
2397681704071010949 | BEGIN | 2397681704071010949 | SELECT item_guid,category,root_guid, count(i
2397681704071010949 | BEGIN | 2397681704071010949 | SELECT item_guid,category,root_guid, count(i
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as
2397681704071010949 | BEGIN | 2397681704071010949 | select folderperm0_.ENTITY_PERMISSION_SID as