explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PB7k

Settings
# exclusive inclusive rows x rows loops node
1. 81,623.330 134,216.756 ↓ 5.1 15,644,976 1

Nested Loop Left Join (cost=0.97..3,548,213.72 rows=3,057,075 width=136) (actual time=4.984..134,216.756 rows=15,644,976 loops=1)

  • Join Filter: ((g.co_name = bdgt.attr_country__office__115226) OR ((bdgt.attr_country__office__115226 = 'Kazakhstan'::text) AND (g.co_name = 'Rest of CEE'::text)))
  • Rows Removed by Join Filter: 813538780
2. 4,525.717 21,303.474 ↓ 5.1 15,644,976 1

Merge Left Join (cost=0.97..307,711.56 rows=3,057,075 width=108) (actual time=4.947..21,303.474 rows=15,644,976 loops=1)

  • Merge Cond: ((bdgt.timemap = tmp_cohort.timemap) AND (bdgt.attr_country__office__115226 = tmp_cohort.attr_country__office__115226) AND (bdgt.attr_technology_group_115215 = tmp_cohort.attr_technology_group_115215) AND (bdgt.map_cohort_115201 = tmp_cohort.map_cohort_115201) AND (bdgt.map_industry_115199 = tmp_cohort.map_industry_115199))
3. 13,806.459 13,806.459 ↑ 1.0 3,057,075 1

Index Scan using tmp_company_by_country_budget_idx on tmp_company_by_country_budget bdgt (cost=0.56..266,528.68 rows=3,057,075 width=96) (actual time=0.031..13,806.459 rows=3,057,075 loops=1)

4. 2,971.298 2,971.298 ↓ 448.7 14,244,952 1

Index Scan using tmp_cohort_idx on tmp_cohort (cost=0.41..2,572.60 rows=31,746 width=88) (actual time=0.023..2,971.298 rows=14,244,952 loops=1)

5. 31,289.933 31,289.952 ↑ 1.0 53 15,644,976

Materialize (cost=0.00..2.80 rows=53 width=13) (actual time=0.000..0.002 rows=53 loops=15,644,976)

6. 0.019 0.019 ↑ 1.0 53 1

Seq Scan on geographicalmap_extended g (cost=0.00..2.53 rows=53 width=13) (actual time=0.006..0.019 rows=53 loops=1)

Planning time : 1.117 ms
Execution time : 134,843.928 ms