explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gep4

Settings
# exclusive inclusive rows x rows loops node
1. 2.695 266.044 ↓ 2,790.0 2,790 1

Group (cost=677.15..677.17 rows=1 width=238) (actual time=262.097..266.044 rows=2,790 loops=1)

  • Output: ms.name, ms.short_id, ms.id
  • Group Key: ms.name, ms.short_id, ms.id
  • Buffers: shared hit=36489 read=3
2. 10.491 263.349 ↓ 2,790.0 2,790 1

Sort (cost=677.15..677.16 rows=1 width=238) (actual time=262.094..263.349 rows=2,790 loops=1)

  • Output: ms.name, ms.short_id, ms.id
  • Sort Key: ms.name, ms.short_id, ms.id
  • Sort Method: quicksort Memory: 339kB
  • Buffers: shared hit=36489 read=3
3. 8.110 252.858 ↓ 2,790.0 2,790 1

Nested Loop Anti Join (cost=673.86..677.14 rows=1 width=238) (actual time=177.274..252.858 rows=2,790 loops=1)

  • Output: ms.name, ms.short_id, ms.id
  • Buffers: shared hit=36489 read=3
4. 8.061 189.784 ↓ 7,852.0 7,852 1

Merge Anti Join (cost=673.30..676.03 rows=1 width=238) (actual time=177.224..189.784 rows=7,852 loops=1)

  • Output: ms.name, ms.short_id, ms.id
  • Merge Cond: (ms.id = fr.owner_id)
  • Buffers: shared hit=8
5. 10.174 180.945 ↓ 7,857.0 7,857 1

Sort (cost=592.27..592.28 rows=1 width=238) (actual time=176.662..180.945 rows=7,857 loops=1)

  • Output: ms.name, ms.short_id, ms.id
  • Sort Key: ms.id
  • Sort Method: quicksort Memory: 868kB
6. 170.771 170.771 ↓ 7,857.0 7,857 1

Foreign Scan (cost=100.00..592.26 rows=1 width=238) (actual time=6.317..170.771 rows=7,857 loops=1)

  • Output: ms.name, ms.short_id, ms.id
  • Relations: ((fdw_merchant.merchant_stores ms) INNER JOIN (fdw_merchant.merchant_addresses ma)) INNER JOIN (fdw_merchant.store_configs sc)
  • Remote SQL: SELECT r1.name, r1.short_id, r1.id FROM ((ifood_merchant.merchant_stores r1 INNER JOIN ifood_merchant.merchant_addresses r2 ON (((r1.id = r2.id)) AND ((r2.country = 'BR'::text)) AND ((r2.state = 'PR'::text)) AND ((r1.status_availability = 'A'::text)))) INNER JOIN ifood_merchant.store_configs r4 ON (((r1.id = r4.store_id)) AND ((r4.value <> 'Key Account'::text)) AND ((r4.key = 'PERFORMANCE_CLASSIFICATION'::text))))
7. 0.536 0.778 ↑ 1.1 460 1

Sort (cost=81.02..82.28 rows=504 width=16) (actual time=0.556..0.778 rows=460 loops=1)

  • Output: fr.owner_id
  • Sort Key: fr.owner_id
  • Sort Method: quicksort Memory: 46kB
  • Buffers: shared hit=8
8. 0.242 0.242 ↑ 1.1 460 1

Seq Scan on ifood_region.feature_rollback fr (cost=0.00..58.40 rows=504 width=16) (actual time=0.012..0.242 rows=460 loops=1)

  • Output: fr.owner_id
  • Buffers: shared hit=8
9. 54.964 54.964 ↑ 101.0 1 7,852

Index Only Scan using deliveries_owner_id_status_mode_idx on ifood_region.deliveries d (cost=0.56..28.92 rows=101 width=16) (actual time=0.007..0.007 rows=1 loops=7,852)

  • Output: d.owner_id, d.status, d.mode
  • Index Cond: ((d.owner_id = ms.id) AND (d.status = 'STAGE'::text) AND (d.mode = 'STAGE'::text))
  • Heap Fetches: 440
  • Buffers: shared hit=36481 read=3
Planning time : 0.656 ms
Execution time : 268.336 ms