explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uhuj

Settings
# exclusive inclusive rows x rows loops node
1. 5,793.092 12,915.137 ↑ 85.0 1 1

GroupAggregate (cost=350,747.43..496,390.97 rows=85 width=12) (actual time=12,915.136..12,915.137 rows=1 loops=1)

  • Group Key: marketplace_upc.marketplace_id
2. 1,554.498 7,122.045 ↓ 1.3 668,010 1

Merge Right Join (cost=350,747.43..493,787.59 rows=520,505 width=17) (actual time=2,968.726..7,122.045 rows=668,010 loops=1)

  • Merge Cond: ((product_ids.gtin_14)::text = (marketplace_upc.gtin_14)::text)
3. 765.578 765.578 ↑ 1.2 2,393,052 1

Index Only Scan using product_ids_gtin_14_index on product_ids (cost=0.43..149,530.89 rows=2,821,231 width=15) (actual time=0.009..765.578 rows=2,393,052 loops=1)

  • Heap Fetches: 59,786
4. 259.451 4,801.969 ↓ 1.4 668,010 1

Materialize (cost=350,747.00..353,162.00 rows=482,999 width=17) (actual time=2,968.712..4,801.969 rows=668,010 loops=1)

5. 4,306.526 4,542.518 ↓ 1.1 511,575 1

Sort (cost=350,747.00..351,954.50 rows=482,999 width=17) (actual time=2,968.710..4,542.518 rows=511,575 loops=1)

  • Sort Key: marketplace_upc.gtin_14
  • Sort Method: external merge Disk: 13,896kB
6. 201.436 235.992 ↓ 1.1 511,575 1

Bitmap Heap Scan on marketplace_upc (cost=11,331.67..295,239.39 rows=482,999 width=17) (actual time=38.674..235.992 rows=511,575 loops=1)

  • Recheck Cond: (marketplace_id = 35)
  • Heap Blocks: exact=24,318
7. 34.556 34.556 ↓ 1.1 511,575 1

Bitmap Index Scan on marketplace_upc_marketplace_id_index (cost=0.00..11,210.93 rows=482,999 width=0) (actual time=34.555..34.556 rows=511,575 loops=1)

  • Index Cond: (marketplace_id = 35)
Planning time : 0.905 ms
Execution time : 12,917.307 ms