explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pcI6

Settings
# exclusive inclusive rows x rows loops node
1. 30.114 3,760.225 ↑ 100.0 2 1

HashAggregate (cost=402,027.81..402,029.81 rows=200 width=20) (actual time=3,760.224..3,760.225 rows=2 loops=1)

  • Group Key: marketplace_upc.marketplace_id
2. 133.573 3,730.111 ↑ 1.5 77,538 1

GroupAggregate (cost=397,516.13..399,771.97 rows=112,792 width=38) (actual time=2,598.214..3,730.111 rows=77,538 loops=1)

  • Group Key: marketplace_upc.provided_upc, marketplace_upc.marketplace_id
3. 1,998.641 3,596.538 ↓ 2.8 316,371 1

Sort (cost=397,516.13..397,798.11 rows=112,792 width=34) (actual time=2,598.179..3,596.538 rows=316,371 loops=1)

  • Sort Key: marketplace_upc.provided_upc, marketplace_upc.marketplace_id
  • Sort Method: external merge Disk: 14,104kB
4. 189.272 1,597.897 ↓ 2.8 316,371 1

Nested Loop Left Join (cost=3,049.91..384,964.02 rows=112,792 width=34) (actual time=11.109..1,597.897 rows=316,371 loops=1)

5. 35.943 90.479 ↓ 1.1 77,538 1

Nested Loop (cost=3,049.48..342,051.09 rows=71,954 width=30) (actual time=11.091..90.479 rows=77,538 loops=1)

6. 0.054 0.054 ↑ 1.0 2 1

Seq Scan on retailer (cost=0.00..7.75 rows=2 width=4) (actual time=0.010..0.054 rows=2 loops=1)

  • Filter: (organization_id = 211)
  • Rows Removed by Filter: 298
7. 44.368 54.482 ↑ 1.9 38,769 2

Bitmap Heap Scan on marketplace_upc (cost=3,049.48..170,282.42 rows=73,925 width=30) (actual time=5.583..27.241 rows=38,769 loops=2)

  • Recheck Cond: (marketplace_id = retailer.marketplace_id)
  • Heap Blocks: exact=6,913
8. 10.114 10.114 ↑ 1.9 38,769 2

Bitmap Index Scan on marketplace_upc_pk (cost=0.00..3,031.00 rows=73,925 width=0) (actual time=5.057..5.057 rows=38,769 loops=2)

  • Index Cond: (marketplace_id = retailer.marketplace_id)
9. 1,318.146 1,318.146 ↑ 1.0 4 77,538

Index Scan using product_ids_gtin_14_index on product_ids _unmatched_upcs (cost=0.43..0.56 rows=4 width=18) (actual time=0.012..0.017 rows=4 loops=77,538)

  • Index Cond: ((marketplace_upc.gtin_14)::text = (gtin_14)::text)
Planning time : 1.906 ms
Execution time : 3,763.053 ms