explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hSWv

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 51.911 ↓ 2.0 2 1

Sort (cost=1,061.83..1,061.83 rows=1 width=282) (actual time=51.911..51.911 rows=2 loops=1)

  • Sort Key: target_tre.tre_path, ihr.ihr_id
  • Sort Method: quicksort Memory: 25kB
2. 5.523 51.900 ↓ 2.0 2 1

Nested Loop (cost=6.13..1,061.82 rows=1 width=282) (actual time=45.199..51.900 rows=2 loops=1)

  • Join Filter: (source_tre.tet_id = source_tre_type.tet_id)
  • Rows Removed by Join Filter: 5606
3. 4.375 18.337 ↓ 5,608.0 5,608 1

Nested Loop (cost=6.13..1,060.33 rows=1 width=72) (actual time=0.460..18.337 rows=5,608 loops=1)

4. 1.025 2.746 ↓ 5,608.0 5,608 1

Nested Loop (cost=5.70..1,058.09 rows=1 width=56) (actual time=0.452..2.746 rows=5,608 loops=1)

5. 0.014 0.014 ↑ 1.0 3 1

Index Scan using tree_element_pkey on tree_element target_tre (cost=0.43..24.70 rows=3 width=40) (actual time=0.006..0.014 rows=3 loops=1)

  • Index Cond: (tre_id = ANY ('{1,2,1482}'::bigint[]))
6. 1.221 1.707 ↓ 17.1 1,869 3

Bitmap Heap Scan on inheritance_rules ihr (cost=5.26..343.37 rows=109 width=32) (actual time=0.175..0.569 rows=1,869 loops=3)

  • Recheck Cond: (tre_id_target = target_tre.tre_id)
  • Heap Blocks: exact=286
7. 0.486 0.486 ↓ 17.1 1,869 3

Bitmap Index Scan on uix_inheritance_inheritance_rules_tre_id_target (cost=0.00..5.24 rows=109 width=0) (actual time=0.162..0.162 rows=1,869 loops=3)

  • Index Cond: (tre_id_target = target_tre.tre_id)
8. 11.216 11.216 ↑ 1.0 1 5,608

Index Scan using tree_element_pkey on tree_element source_tre (cost=0.43..2.23 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=5,608)

  • Index Cond: (tre_id = ihr.tre_id_source)
9. 28.040 28.040 ↑ 1.0 1 5,608

Seq Scan on tree_element_type source_tre_type (cost=0.00..1.48 rows=1 width=226) (actual time=0.005..0.005 rows=1 loops=5,608)

  • Filter: ((tet_class)::text = 'Account_Model_Entity_DataPrivacyOfficer'::text)
  • Rows Removed by Filter: 37