explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0AH

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 0.470 ↓ 4.0 4 1

GroupAggregate (cost=0.17..36.69 rows=1 width=49) (actual time=0.117..0.470 rows=4 loops=1)

  • Group Key: daa.child_type, daa.child_id
2. 0.001 0.446 ↓ 4.0 4 1

Nested Loop Left Join (cost=0.17..36.68 rows=1 width=21) (actual time=0.072..0.446 rows=4 loops=1)

3. 0.041 0.193 ↓ 4.0 4 1

Nested Loop Left Join (cost=0.11..11.71 rows=1 width=21) (actual time=0.065..0.193 rows=4 loops=1)

  • Join Filter: (('digital_asset_folder'::text = daa.child_type) AND (daa.child_id = child_daf.id))
  • Rows Removed by Join Filter: 509
  • Filter: (((child_daf.id IS NOT NULL) AND (child_daf.archived_at IS NULL)) OR ((child_da.id IS NOT NULL) AND (child_da.archived_at IS NULL)))
  • Rows Removed by Filter: 2
4. 0.008 0.062 ↓ 6.0 6 1

Nested Loop Left Join (cost=0.11..8.13 rows=1 width=25) (actual time=0.037..0.062 rows=6 loops=1)

  • Join Filter: ('digital_asset'::text = daa.child_type)
5. 0.030 0.030 ↓ 6.0 6 1

Index Only Scan using digital_asset_associations_index_calendar_id_parent_type_parent on digital_asset_associations daa (cost=0.06..4.06 rows=1 width=17) (actual time=0.022..0.030 rows=6 loops=1)

  • Index Cond: ((calendar_id = 16) AND (parent_type = 'digital_asset_folder'::text) AND (parent_id = 177))
  • Heap Fetches: 6
6. 0.024 0.024 ↓ 0.0 0 6

Index Scan using digital_assets_pkey on digital_assets child_da (cost=0.06..4.06 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=6)

  • Index Cond: (id = daa.child_id)
  • Filter: (calendar_id = 16)
  • Rows Removed by Filter: 0
7. 0.090 0.090 ↓ 1.2 85 6

Seq Scan on digital_asset_folders child_daf (cost=0.00..3.29 rows=72 width=8) (actual time=0.002..0.015 rows=85 loops=6)

  • Filter: (calendar_id = 16)
  • Rows Removed by Filter: 13
8. 0.252 0.252 ↓ 0.0 0 4

Index Only Scan using digital_asset_associations_index_calendar_id_parent_type_parent on digital_asset_associations child_folder_associations (cost=0.06..24.97 rows=1 width=8) (actual time=0.063..0.063 rows=0 loops=4)

  • Index Cond: ((parent_type = 'digital_asset_folder'::text) AND (parent_id = child_daf.id) AND (child_type = 'digital_asset_folder'::text))
  • Heap Fetches: 0