explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4utY

Settings
# exclusive inclusive rows x rows loops node
1. 720.281 30,435.181 ↑ 2.4 10,555 1

GroupAggregate (cost=1,000.64..1,420,112.01 rows=25,247 width=68) (actual time=60.739..30,435.181 rows=10,555 loops=1)

  • Group Key: lec.entity_id
2. 2,094.046 29,714.900 ↓ 1.0 448,381 1

Gather Merge (cost=1,000.64..1,416,295.40 rows=441,556 width=28) (actual time=56.724..29,714.900 rows=448,381 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 13,416.152 27,620.854 ↑ 1.2 89,676 5 / 5

Nested Loop Left Join (cost=0.58..1,362,701.76 rows=110,389 width=28) (actual time=0.256..27,620.854 rows=89,676 loops=5)

  • Join Filter: ((NOT lec.global) AND (dc.id = lec.country_id))
  • Rows Removed by Join Filter: 30,041,527
4. 131.014 394.567 ↑ 1.2 89,676 5 / 5

Nested Loop Left Join (cost=0.58..89,088.68 rows=110,389 width=25) (actual time=0.061..394.567 rows=89,676 loops=5)

  • Join Filter: lec.global
  • Rows Removed by Join Filter: 70
5. 84.201 84.201 ↑ 1.2 89,676 5 / 5

Parallel Index Scan using idx_link_entity_country_2 on link_entity_country lec (cost=0.43..69,777.57 rows=110,389 width=9) (actual time=0.040..84.201 rows=89,676 loops=5)

  • Index Cond: (entity_type_id = 17)
6. 179.352 179.352 ↑ 1.0 1 448,381 / 5

Index Scan using pk_delivery_country on delivery_country dc (cost=0.15..0.17 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=448,381)

  • Index Cond: (id = lec.country_id)
7. 13,810.135 13,810.135 ↑ 1.0 335 448,381 / 5

Seq Scan on delivery_country dc2 (cost=0.00..7.35 rows=335 width=12) (actual time=0.001..0.154 rows=335 loops=448,381)

Planning time : 0.247 ms
Execution time : 30,489.158 ms