explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ARig

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 0.133 ↓ 2.0 2 1

GroupAggregate (cost=11.48..11.49 rows=1 width=45) (actual time=0.131..0.133 rows=2 loops=1)

  • Group Key: daa.child_type
2. 0.025 0.118 ↓ 4.0 4 1

Sort (cost=11.48..11.49 rows=1 width=17) (actual time=0.118..0.118 rows=4 loops=1)

  • Sort Key: daa.child_type
  • Sort Method: quicksort Memory: 25kB
3. 0.006 0.093 ↓ 4.0 4 1

Nested Loop Left Join (cost=4.12..11.48 rows=1 width=17) (actual time=0.071..0.093 rows=4 loops=1)

  • Join Filter: ('digital_asset'::text = daa.child_type)
  • 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.018 0.069 ↓ 6.0 6 1

Hash Right Join (cost=4.07..7.42 rows=1 width=25) (actual time=0.062..0.069 rows=6 loops=1)

  • Hash Cond: (child_daf.id = daa.child_id)
  • Join Filter: ('digital_asset_folder'::text = daa.child_type)
5. 0.023 0.023 ↓ 1.3 91 1

Seq Scan on digital_asset_folders child_daf (cost=0.00..3.29 rows=72 width=8) (actual time=0.006..0.023 rows=91 loops=1)

  • Filter: (calendar_id = 16)
  • Rows Removed by Filter: 13
6. 0.004 0.028 ↓ 6.0 6 1

Hash (cost=4.06..4.06 rows=1 width=17) (actual time=0.028..0.028 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.024 0.024 ↓ 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.017..0.024 rows=6 loops=1)

  • Index Cond: ((calendar_id = 16) AND (parent_type = 'digital_asset_folder'::text) AND (parent_id = 177))
  • Heap Fetches: 6
8. 0.018 0.018 ↓ 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.003..0.003 rows=0 loops=6)

  • Index Cond: (id = daa.child_id)
  • Filter: (calendar_id = 16)
  • Rows Removed by Filter: 0
Planning time : 0.366 ms
Execution time : 0.191 ms