explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5pZx

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

Limit (cost=131.15..257.43 rows=100 width=65) (actual rows= loops=)

  • Output: i.item_id, m.text_value, h.handle_id
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.87..425,988.79 rows=337,334 width=65) (actual rows= loops=)

  • Output: i.item_id, m.text_value, h.handle_id
  • Join Filter: (m.resource_type_id = h.resource_type_id)
3. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=4.44..55,761.59 rows=135,038 width=12) (actual rows= loops=)

  • Output: i.item_id, h.handle_id, h.resource_type_id
  • Merge Cond: (i.item_id = h.resource_id)
4. 0.000 0.000 ↓ 0.0

Merge Join (cost=3.26..36,802.95 rows=135,038 width=4) (actual rows= loops=)

  • Output: i.item_id
  • Merge Cond: (c2i.item_id = i.item_id)
5. 0.000 0.000 ↓ 0.0

Index Scan using collection2item_item_id_idx on public.collection2item c2i (cost=0.42..13,936.55 rows=135,698 width=4) (actual rows= loops=)

  • Output: c2i.id, c2i.collection_id, c2i.item_id
  • Filter: (c2i.collection_id = 56)
6. 0.000 0.000 ↓ 0.0

Index Scan using item_pkey on public.item i (cost=0.42..21,007.86 rows=306,087 width=4) (actual rows= loops=)

  • Output: i.item_id, i.submitter_id, i.in_archive, i.withdrawn, i.last_modified, i.owning_collection, i.discoverable
  • Filter: i.in_archive
7. 0.000 0.000 ↓ 0.0

Index Scan using handle_resource_id_and_type_idx on public.handle h (cost=0.42..16,561.87 rows=299,328 width=12) (actual rows= loops=)

  • Output: h.handle_id, h.handle, h.resource_type_id, h.resource_id
  • Index Cond: (h.resource_type_id = 2)
8. 0.000 0.000 ↓ 0.0

Index Scan using metadatavalue_item_idx2 on public.metadatavalue m (cost=0.43..2.72 rows=2 width=65) (actual rows= loops=)

  • Output: m.metadata_value_id, m.resource_id, m.metadata_field_id, m.text_value, m.text_lang, m.place, m.authority, m.confidence, m.resource_type_id
  • Index Cond: ((m.resource_id = i.item_id) AND (m.metadata_field_id = 64))
  • Filter: ((m.resource_type_id = 2) AND (m.place = 1))