673 lines
33 KiB
JSON
673 lines
33 KiB
JSON
{
|
|
"date": "2026-11-02",
|
|
"identity": {
|
|
"database": "sgf_tempo_test",
|
|
"role": "sgf_test_runner",
|
|
"port": 55439,
|
|
"cluster": "sgf_modular_regression_2576427d1939"
|
|
},
|
|
"records_per_area": 10000,
|
|
"variants": {
|
|
"batch": [
|
|
{
|
|
"signature": "50ff98a3116b073b1b26095ecaf597708917b73ca926112c977ec7507813bf3a",
|
|
"shape": "WITH scoped AS MATERIALIZED (select id,action,details::jsonb->>'record_id' AS record_id,details::jsonb->>'module_id' AS module_id from \"identity_audit\" where (\"tenant_id\" = ? and \"company_id\" = ?) and \"action\" in (?, ?, ?) and details::jsonb->>'area' = ? and details::jsonb->>'record_id' in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)),\n latest AS (SELECT DISTINCT ON (record_id,module_id) record_id,module_id,action FROM scoped\n WHERE action <> 'module.record.reviewed' ORDER BY record_id,module_id,id DESC),\n revisions AS (SELECT record_id,max(id) AS revision FROM scoped GROUP BY record_id)\n SELECT r.record_id,r.revision,coalesce(jsonb_agg(l.module_id ORDER BY l.module_id)\n FILTER (WHERE l.action='module.record.associated'),'[]'::jsonb) AS modules\n FROM revisions r LEFT JOIN latest l ON l.record_id=r.record_id GROUP BY r.record_id,r.revision",
|
|
"execution_ms": 98.525,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Gather",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Seq Scan",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 190,
|
|
"Actual Loops": 3,
|
|
"Rows Removed by Filter": 75367,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash Join",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Unique",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Rows Removed by Filter": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"signature": "10d02426d5830d39b0c3d99210b0d23d0023c3ee581a7885c043b23039fd95e3",
|
|
"shape": "select count(*) as \"aggregate\" from \"a_clients\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" is null) and NOT EXISTS (SELECT 1 FROM identity_audit me WHERE me.tenant_id=a_clients.tenant_id AND me.company_id=a_clients.company_id\n AND me.action IN ('module.record.associated','module.record.disassociated') AND me.details::jsonb->>'area'=? AND me.details::jsonb->>'record_id'=a_clients.id::text)",
|
|
"execution_ms": 194.636,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 1,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7461,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 672,
|
|
"Temp Written Blocks": 672
|
|
},
|
|
{
|
|
"Node Type": "Hash Join",
|
|
"Actual Rows": 3334,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7461,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 672,
|
|
"Temp Written Blocks": 672
|
|
},
|
|
{
|
|
"Node Type": "Seq Scan",
|
|
"Relation Name": "a_clients",
|
|
"Actual Rows": 10000,
|
|
"Actual Loops": 1,
|
|
"Rows Removed by Filter": 104,
|
|
"Shared Hit Blocks": 135,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash",
|
|
"Actual Rows": 56661,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7326,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 610
|
|
},
|
|
{
|
|
"Node Type": "Gather",
|
|
"Actual Rows": 56661,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7326,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Seq Scan",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 18887,
|
|
"Actual Loops": 3,
|
|
"Rows Removed by Filter": 56669,
|
|
"Shared Hit Blocks": 7326,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"signature": "d829bbef004ef2eaed502b3df683fdde82e28f848a85c0e2202e743b86bc046d",
|
|
"shape": "select * from \"a_clients\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" is null) and NOT EXISTS (SELECT 1 FROM identity_audit me WHERE me.tenant_id=a_clients.tenant_id AND me.company_id=a_clients.company_id\n AND me.action IN ('module.record.associated','module.record.disassociated') AND me.details::jsonb->>'area'=? AND me.details::jsonb->>'record_id'=a_clients.id::text) order by \"id\" asc limit 25 offset 0",
|
|
"execution_ms": 1323.111,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Limit",
|
|
"Actual Rows": 25,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7332,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 29477,
|
|
"Temp Written Blocks": 1162
|
|
},
|
|
{
|
|
"Node Type": "Nested Loop",
|
|
"Actual Rows": 25,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7332,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 29477,
|
|
"Temp Written Blocks": 1162
|
|
},
|
|
{
|
|
"Node Type": "Index Scan",
|
|
"Index Name": "a_clients_pkey",
|
|
"Relation Name": "a_clients",
|
|
"Actual Rows": 73,
|
|
"Actual Loops": 1,
|
|
"Rows Removed by Filter": 4,
|
|
"Shared Hit Blocks": 6,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Materialize",
|
|
"Actual Rows": 20450,
|
|
"Actual Loops": 73,
|
|
"Shared Hit Blocks": 7326,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 29477,
|
|
"Temp Written Blocks": 1162
|
|
},
|
|
{
|
|
"Node Type": "Gather",
|
|
"Actual Rows": 56661,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7326,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Seq Scan",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 18887,
|
|
"Actual Loops": 3,
|
|
"Rows Removed by Filter": 56669,
|
|
"Shared Hit Blocks": 7326,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"signature": "2cba1346e4495a631236b0eb5d232028dcb4c332321f9c0f6789c42055f3f90b",
|
|
"shape": "WITH scoped AS MATERIALIZED (select id,action,details::jsonb->>'record_id' AS record_id,details::jsonb->>'module_id' AS module_id from \"identity_audit\" where (\"tenant_id\" = ? and \"company_id\" = ?) and \"action\" in (?, ?, ?) and details::jsonb->>'area' = ? and details::jsonb->>'record_id' in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)),\n latest AS (SELECT DISTINCT ON (record_id,module_id) record_id,module_id,action FROM scoped\n WHERE action <> 'module.record.reviewed' ORDER BY record_id,module_id,id DESC),\n revisions AS (SELECT record_id,max(id) AS revision FROM scoped GROUP BY record_id)\n SELECT r.record_id,r.revision,coalesce(jsonb_agg(l.module_id ORDER BY l.module_id)\n FILTER (WHERE l.action='module.record.associated'),'[]'::jsonb) AS modules\n FROM revisions r LEFT JOIN latest l ON l.record_id=r.record_id GROUP BY r.record_id,r.revision",
|
|
"execution_ms": 77.761,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Gather",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Seq Scan",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 3,
|
|
"Rows Removed by Filter": 75556,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash Join",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Unique",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 0,
|
|
"Rows Removed by Filter": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 7320,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"indexed_batch": [
|
|
{
|
|
"signature": "50ff98a3116b073b1b26095ecaf597708917b73ca926112c977ec7507813bf3a",
|
|
"shape": "WITH scoped AS MATERIALIZED (select id,action,details::jsonb->>'record_id' AS record_id,details::jsonb->>'module_id' AS module_id from \"identity_audit\" where (\"tenant_id\" = ? and \"company_id\" = ?) and \"action\" in (?, ?, ?) and details::jsonb->>'area' = ? and details::jsonb->>'record_id' in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)),\n latest AS (SELECT DISTINCT ON (record_id,module_id) record_id,module_id,action FROM scoped\n WHERE action <> 'module.record.reviewed' ORDER BY record_id,module_id,id DESC),\n revisions AS (SELECT record_id,max(id) AS revision FROM scoped GROUP BY record_id)\n SELECT r.record_id,r.revision,coalesce(jsonb_agg(l.module_id ORDER BY l.module_id)\n FILTER (WHERE l.action='module.record.associated'),'[]'::jsonb) AS modules\n FROM revisions r LEFT JOIN latest l ON l.record_id=r.record_id GROUP BY r.record_id,r.revision",
|
|
"execution_ms": 1.563,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 576,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Index Scan",
|
|
"Index Name": "sgf_qa_assoc_revision",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 576,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 576,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash Join",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 576,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Unique",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Rows Removed by Filter": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 576,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 67,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 576,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 569,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 576,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"signature": "10d02426d5830d39b0c3d99210b0d23d0023c3ee581a7885c043b23039fd95e3",
|
|
"shape": "select count(*) as \"aggregate\" from \"a_clients\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" is null) and NOT EXISTS (SELECT 1 FROM identity_audit me WHERE me.tenant_id=a_clients.tenant_id AND me.company_id=a_clients.company_id\n AND me.action IN ('module.record.associated','module.record.disassociated') AND me.details::jsonb->>'area'=? AND me.details::jsonb->>'record_id'=a_clients.id::text)",
|
|
"execution_ms": 104.319,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 1,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 57204,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 672,
|
|
"Temp Written Blocks": 672
|
|
},
|
|
{
|
|
"Node Type": "Hash Join",
|
|
"Actual Rows": 3334,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 57204,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 672,
|
|
"Temp Written Blocks": 672
|
|
},
|
|
{
|
|
"Node Type": "Seq Scan",
|
|
"Relation Name": "a_clients",
|
|
"Actual Rows": 10000,
|
|
"Actual Loops": 1,
|
|
"Rows Removed by Filter": 104,
|
|
"Shared Hit Blocks": 135,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash",
|
|
"Actual Rows": 56661,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 57069,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 610
|
|
},
|
|
{
|
|
"Node Type": "Index Scan",
|
|
"Index Name": "sgf_qa_assoc_revision",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 56661,
|
|
"Actual Loops": 1,
|
|
"Rows Removed by Filter": 0,
|
|
"Shared Hit Blocks": 57069,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"signature": "d829bbef004ef2eaed502b3df683fdde82e28f848a85c0e2202e743b86bc046d",
|
|
"shape": "select * from \"a_clients\" where (\"tenant_id\" = ? and \"company_id\" = ? and \"unit_id\" is null) and NOT EXISTS (SELECT 1 FROM identity_audit me WHERE me.tenant_id=a_clients.tenant_id AND me.company_id=a_clients.company_id\n AND me.action IN ('module.record.associated','module.record.disassociated') AND me.details::jsonb->>'area'=? AND me.details::jsonb->>'record_id'=a_clients.id::text) order by \"id\" asc limit 25 offset 0",
|
|
"execution_ms": 0.368,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Limit",
|
|
"Actual Rows": 25,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 273,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Nested Loop",
|
|
"Actual Rows": 25,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 273,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Index Scan",
|
|
"Index Name": "a_clients_pkey",
|
|
"Relation Name": "a_clients",
|
|
"Actual Rows": 73,
|
|
"Actual Loops": 1,
|
|
"Rows Removed by Filter": 4,
|
|
"Shared Hit Blocks": 6,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Index Scan",
|
|
"Index Name": "sgf_qa_assoc_revision",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 1,
|
|
"Actual Loops": 73,
|
|
"Rows Removed by Filter": 0,
|
|
"Shared Hit Blocks": 267,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"signature": "2cba1346e4495a631236b0eb5d232028dcb4c332321f9c0f6789c42055f3f90b",
|
|
"shape": "WITH scoped AS MATERIALIZED (select id,action,details::jsonb->>'record_id' AS record_id,details::jsonb->>'module_id' AS module_id from \"identity_audit\" where (\"tenant_id\" = ? and \"company_id\" = ?) and \"action\" in (?, ?, ?) and details::jsonb->>'area' = ? and details::jsonb->>'record_id' in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)),\n latest AS (SELECT DISTINCT ON (record_id,module_id) record_id,module_id,action FROM scoped\n WHERE action <> 'module.record.reviewed' ORDER BY record_id,module_id,id DESC),\n revisions AS (SELECT record_id,max(id) AS revision FROM scoped GROUP BY record_id)\n SELECT r.record_id,r.revision,coalesce(jsonb_agg(l.module_id ORDER BY l.module_id)\n FILTER (WHERE l.action='module.record.associated'),'[]'::jsonb) AS modules\n FROM revisions r LEFT JOIN latest l ON l.record_id=r.record_id GROUP BY r.record_id,r.revision",
|
|
"execution_ms": 0.167,
|
|
"nodes": [
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 12,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Index Scan",
|
|
"Index Name": "sgf_qa_assoc_revision",
|
|
"Relation Name": "identity_audit",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 12,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 12,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash Join",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 12,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Unique",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Sort",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 0,
|
|
"Rows Removed by Filter": 0,
|
|
"Shared Hit Blocks": 0,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Hash",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 12,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "Aggregate",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 12,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
},
|
|
{
|
|
"Node Type": "CTE Scan",
|
|
"Actual Rows": 0,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 12,
|
|
"Shared Read Blocks": 0,
|
|
"Temp Read Blocks": 0,
|
|
"Temp Written Blocks": 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"indexes_rolled_back": true
|
|
}
|