explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TyW

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

Limit (cost=85,419.40..85,419.41 rows=1 width=1,732) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=85,419.40..85,419.41 rows=1 width=1,732) (actual rows= loops=)

  • Sort Key: l_post.line_identifier, kpi_lc_post.context
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=39,265.77..85,419.39 rows=1 width=1,732) (actual rows= loops=)

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

Nested Loop (cost=39,265.49..85,418.98 rows=1 width=207) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=39,265.06..85,418.48 rows=1 width=186) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Join (cost=39,264.64..85,418.02 rows=1 width=165) (actual rows= loops=)

  • Hash Cond: (a_pre.hashed_msisdn = a_post.hashed_msisdn)
  • Join Filter: (st_distance(st_transform(a_post.geocoded_location, 31370), st_transform(a_pre.geocoded_location, 31370)) < '50'::double precision)
7. 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=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=39,264.63..39,264.63 rows=1 width=176) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Merge Join (cost=246.57..39,264.63 rows=1 width=176) (actual rows= loops=)

  • Merge Cond: (a_post.hashed_msisdn = kpi_post.originating_msisdn)
  • Join Filter: (kpi_pre.device_capability = kpi_post.device_capability)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..3,042,442.56 rows=78 width=158) (actual rows= loops=)

  • Join Filter: (a_post.hashed_msisdn = kpi_pre.originating_msisdn)
11. 0.000 0.000 ↓ 0.0

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

  • Join Filter: (a_post.hashed_msisdn = kpi_lc_post.originating_msisdn)
12. 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))
13. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..90,907.25 rows=1,039,150 width=53) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on addresses a_post (cost=0.00..85,711.50 rows=1,039,150 width=53) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

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

16. 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=)

17. 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
18. 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=)

19. 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_post.hashed_msisdn)
20. 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)
21. 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)