explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cvz1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=247.87..31,747.14 rows=1 width=1,732) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=247.87..31,747.14 rows=1 width=1,732) (actual rows= loops=)

  • Join Filter: ("right"(kpi_lc_post.context, 1) = (kpi_p80_post.p80)::text)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=247.59..31,746.73 rows=1 width=207) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=247.17..31,746.24 rows=1 width=186) (actual rows= loops=)

  • Join Filter: (l_post.line_identifier = a_post.hashed_msisdn)
5. 0.000 0.000 ↓ 0.0

Merge Join (cost=246.88..31,717.00 rows=1 width=197) (actual rows= loops=)

  • Merge Cond: (l_post.line_identifier = kpi_post.originating_msisdn)
  • Join Filter: (kpi_pre.device_capability = kpi_post.device_capability)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..2,957,017.18 rows=94 width=179) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..2,956,980.03 rows=80 width=158) (actual rows= loops=)

  • Join Filter: (a_pre.hashed_msisdn = kpi_pre.originating_msisdn)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..1,707,424.38 rows=94 width=134) (actual rows= loops=)

  • Join Filter: (a_pre.hashed_msisdn = kpi_lc_post.originating_msisdn)
9. 0.000 0.000 ↓ 0.0

Index Scan using kpi_scen1_final_2_originating_msisdn_context_idx on kpi_scen1_final_2 kpi_lc_post (cost=0.42..239,376.03 rows=94 width=81) (actual rows= loops=)

  • Filter: ((user_profile <> 'no usage'::text) AND ("left"(context, 1) = '3'::text))
10. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..47,414.96 rows=1,009,331 width=53) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on addresses a_pre (cost=0.00..42,368.31 rows=1,009,331 width=53) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..38,727.04 rows=860,269 width=24) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on kpi_scen1_line kpi_pre (cost=0.00..34,425.69 rows=860,269 width=24) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Only Scan using lines_snapshot_usage_line_identifier_idx on lines_snapshot_usage l_post (cost=0.42..0.45 rows=1 width=21) (actual rows= loops=)

  • Index Cond: (line_identifier = a_pre.hashed_msisdn)
15. 0.000 0.000 ↓ 0.0

Sort (cost=246.02..252.27 rows=2,499 width=24) (actual rows= loops=)

  • Sort Key: kpi_post.originating_msisdn
16. 0.000 0.000 ↓ 0.0

Seq Scan on kpi_scen1_line kpi_post (cost=0.00..104.99 rows=2,499 width=24) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using addresses_geom_proj_idx on addresses a_post (cost=0.29..29.22 rows=1 width=53) (actual rows= loops=)

  • Index Cond: (geom_proj && st_expand(a_pre.geom_proj, '50'::double precision))
  • Filter: ((a_pre.hashed_msisdn = hashed_msisdn) AND (a_pre.geom_proj && st_expand(geom_proj, '50'::double precision)) AND _st_dwithin(geom_proj, a_pre.geom_proj, '50'::double precision))
18. 0.000 0.000 ↓ 0.0

Index Only Scan using lines_snapshot_usage_line_identifier_idx on lines_snapshot_usage l_pre (cost=0.42..0.48 rows=1 width=21) (actual rows= loops=)

  • Index Cond: (line_identifier = a_post.hashed_msisdn)
19. 0.000 0.000 ↓ 0.0

Index Scan using kpi_scen1_p80_originating_msisdn_p80_idx on kpi_scen1_p80 kpi_p80_post (cost=0.28..0.34 rows=3 width=1,616) (actual rows= loops=)

  • Index Cond: (originating_msisdn = a_post.hashed_msisdn)