explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S5Vu : TEST

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

Limit (cost=5,384.61..5,541.86 rows=100 width=444) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Seq Scan on versions (cost=5,384.61..169,565.65 rows=104,408 width=444) (actual rows= loops=)

  • Filter: ((((item_type)::text = 'Restaurant'::text) AND (item_id = 2706)) OR (((item_type)::text = 'Branch'::text) AND (hashed SubPlan 1)) OR (((item_type)::text = 'Menuitem'::text) AND (hashed SubPlan 2)) OR (((item_type)::text = 'Menugroup'::text) AND (hashed SubPlan 3)) OR (((item_type)::text = 'ExclusiveContract'::text) AND (hashed SubPlan 4)))
3.          

SubPlan (forSeq Scan)

4. 0.000 0.000 ↓ 0.0

Index Scan using index_branches_on_restaurant_id on branches (cost=0.28..8.29 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (restaurant_id = 2706)
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=637.33..4,730.68 rows=42 width=8) (actual rows= loops=)

  • Hash Cond: (menuitems.menugroup_id = menugroups.id)
6. 0.000 0.000 ↓ 0.0

Seq Scan on menuitems (cost=0.00..3,702.68 rows=104,068 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=637.21..637.21 rows=9 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on menugroups (cost=0.00..637.21 rows=9 width=8) (actual rows= loops=)

  • Filter: (restaurant_id = 2706)
9. 0.000 0.000 ↓ 0.0

Seq Scan on menugroups menugroups_1 (cost=0.00..637.21 rows=9 width=8) (actual rows= loops=)

  • Filter: (restaurant_id = 2706)
10. 0.000 0.000 ↓ 0.0

Index Scan using index_exclusive_contracts_on_restaurant_id on exclusive_contracts (cost=0.28..8.29 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (restaurant_id = 2706)