explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0QeG

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

Aggregate (cost=541,800.83..541,800.84 rows=1 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Merge Join (cost=2.27..541,777.61 rows=774 width=19) (actual rows= loops=)

  • Merge Cond: (orders.id = order_storekeepers.order_id)
  • Join Filter: ((order_storekeepers.storekeeper_id = 1234) OR ((orders.deliveryboy_id = 1234) AND order_storekeepers.is_current))
3. 0.000 0.000 ↓ 0.0

Index Scan using orders_copy_pkey on orders (cost=0.43..239,731.41 rows=4,654,105 width=27) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Index Scan using order_storekeepers_order_id_index on order_storekeepers (cost=0.43..196,089.98 rows=5,465,429 width=13) (actual rows= loops=)