explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UXBe

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

CTE Scan on x (cost=2,793,097.45..2,793,108.41 rows=137 width=224) (actual rows= loops=)

2.          

CTE x

3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=2,793,091.62..2,793,097.45 rows=137 width=152) (actual rows= loops=)

  • Group Key: ug.name, o.dep_idx, o.name
4. 0.000 0.000 ↓ 0.0

Sort (cost=2,793,091.62..2,793,091.97 rows=137 width=136) (actual rows= loops=)

  • Sort Key: ug.name, o.dep_idx, o.name
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.12..2,793,086.76 rows=137 width=136) (actual rows= loops=)

  • Join Filter: (u.org_id = o.id)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.12..2,772,788.09 rows=137 width=65) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Only Scan using ug_idname_idx on user_group ug (cost=0.42..4.44 rows=1 width=49) (actual rows= loops=)

  • Index Cond: (id = 2)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.70..2,772,782.28 rows=137 width=32) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.13..2,772,658.38 rows=137 width=40) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.56..2,721,865.38 rows=42,965 width=64) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..2,678,533.47 rows=42,965 width=48) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using "idx$$_6d740003" on usr u (cost=0.42..1,269.99 rows=316 width=24) (actual rows= loops=)

  • Index Cond: (group_id = 2)
13. 0.000 0.000 ↓ 0.0

Index Scan using dc_executor_idx on document_control dc (cost=0.57..8,441.02 rows=3,133 width=40) (actual rows= loops=)

  • Index Cond: (executor = u.id)
  • Filter: (g_mtime <= '2019-09-21 00:00:00'::timestamp without time zone)
14. 0.000 0.000 ↓ 0.0

Index Scan using document_pk11118759906747_1_1 on document d (cost=0.57..1.00 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = dc.document_id)
15. 0.000 0.000 ↓ 0.0

Index Scan using document_n_uniq_idx on document_n dn (cost=0.57..1.17 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((document_id = d.id) AND (org_id = d.r_org_id))
  • Filter: ((rdate >= '2018-09-01 00:00:00'::timestamp without time zone) AND (rdate <= '2019-10-01 23:59:59.999999'::timestamp without time zone) AND (status = 8) AND (d_deleted = 0))
16. 0.000 0.000 ↓ 0.0

Index Only Scan using sys_c0014909 on resolution_to rt (cost=0.57..0.89 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = dc.resolution_to_id)
17. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..422.26 rows=9,684 width=87) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on org o (cost=0.00..373.84 rows=9,684 width=87) (actual rows= loops=)