explain.depesz.com

PostgreSQL's explain analyze made readable

Result: v95Y

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

Append (cost=1.55..341,029.82 rows=3 width=84) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=1.55..162,960.66 rows=2 width=112) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1.55..162,960.64 rows=2 width=112) (actual rows= loops=)

  • Group Key: gt.grid_type
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.55..162,958.67 rows=97 width=112) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.14..162,681.36 rows=97 width=145) (actual rows= loops=)

  • Join Filter: (grid.grid_type = gt.grid_type)
6. 0.000 0.000 ↓ 0.0

Index Scan using pk_t_dim_grid_type on t_dim_grid_type gt (cost=0.15..12.19 rows=2 width=84) (actual rows= loops=)

  • Index Cond: ((grid_type >= 4) AND (grid_type <= 8))
7. 0.000 0.000 ↓ 0.0

Materialize (cost=0.99..162,120.58 rows=19,949 width=63) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..162,020.83 rows=19,949 width=63) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using idx_date_grid_index_alert on t_nearlytime_grid_alert_running_statis alert (cost=0.56..35,254.17 rows=19,949 width=86) (actual rows= loops=)

  • Index Cond: ((date_key)::text = '2019012218'::text)
10. 0.000 0.000 ↓ 0.0

Index Scan using pk_t_dim_grid_area on t_dim_grid_area grid (cost=0.43..6.34 rows=1 width=43) (actual rows= loops=)

  • Index Cond: ((grid_guid)::text = (alert.grid_guid)::text)
11. 0.000 0.000 ↓ 0.0

Index Scan using pk_t_dim_city_info on t_dim_city_info city (cost=0.42..2.85 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((city_guid)::text = (alert.city_guid)::text)
  • Filter: ((country_guid)::text = '-9999'::text)
12. 0.000 0.000 ↓ 0.0

Aggregate (cost=178,069.15..178,069.16 rows=1 width=28) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,613.79..177,934.76 rows=7,679 width=28) (actual rows= loops=)

  • Hash Cond: ((alert_1.city_guid)::text = (city_1.city_guid)::text)
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..162,120.58 rows=7,679 width=61) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using idx_date_grid_index_alert on t_nearlytime_grid_alert_running_statis alert_1 (cost=0.56..35,254.17 rows=19,949 width=86) (actual rows= loops=)

  • Index Cond: ((date_key)::text = '2019012218'::text)
16. 0.000 0.000 ↓ 0.0

Index Scan using pk_t_dim_grid_area on t_dim_grid_area grid_1 (cost=0.43..6.35 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((grid_guid)::text = (alert_1.grid_guid)::text)
  • Filter: ((grid_type >= 1) AND (grid_type <= 3))
17. 0.000 0.000 ↓ 0.0

Hash (cost=8,670.40..8,670.40 rows=243,312 width=33) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on t_dim_city_info city_1 (cost=0.00..8,670.40 rows=243,312 width=33) (actual rows= loops=)

  • Filter: ((country_guid)::text = '-9999'::text)