explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C6Vu

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 8,269.881 ↓ 2.0 6 1

Append (cost=1.55..341,029.82 rows=3 width=84) (actual time=3,237.199..8,269.881 rows=6 loops=1)

2. 0.012 7,611.161 ↓ 2.5 5 1

Subquery Scan on *SELECT* 1 (cost=1.55..162,960.66 rows=2 width=112) (actual time=3,237.198..7,611.161 rows=5 loops=1)

3. 20.733 7,611.149 ↓ 2.5 5 1

GroupAggregate (cost=1.55..162,960.64 rows=2 width=112) (actual time=3,237.193..7,611.149 rows=5 loops=1)

  • Group Key: gt.grid_type
4. 15.055 7,590.416 ↓ 173.1 16,790 1

Nested Loop (cost=1.55..162,958.67 rows=97 width=112) (actual time=1.403..7,590.416 rows=16,790 loops=1)

5. 22.380 947.493 ↓ 173.4 16,822 1

Nested Loop (cost=1.14..162,681.36 rows=97 width=145) (actual time=1.359..947.493 rows=16,822 loops=1)

  • Join Filter: (grid.grid_type = gt.grid_type)
  • Rows Removed by Join Filter: 75053
6. 0.043 0.043 ↓ 2.5 5 1

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

  • Index Cond: ((grid_type >= 4) AND (grid_type <= 8))
7. 18.621 925.070 ↑ 1.1 18,375 5

Materialize (cost=0.99..162,120.58 rows=19,949 width=63) (actual time=0.112..185.014 rows=18,375 loops=5)

8. 25.374 906.449 ↑ 1.1 18,375 1

Nested Loop (cost=0.99..162,020.83 rows=19,949 width=63) (actual time=0.552..906.449 rows=18,375 loops=1)

9. 17.403 17.403 ↑ 1.1 18,376 1

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 time=0.478..17.403 rows=18,376 loops=1)

  • Index Cond: ((date_key)::text = '2019012218'::text)
10. 863.672 863.672 ↑ 1.0 1 18,376

Index Scan using pk_t_dim_grid_area on t_dim_grid_area grid (cost=0.43..6.34 rows=1 width=43) (actual time=0.008..0.047 rows=1 loops=18,376)

  • Index Cond: ((grid_guid)::text = (alert.grid_guid)::text)
11. 6,627.868 6,627.868 ↑ 1.0 1 16,822

Index Scan using pk_t_dim_city_info on t_dim_city_info city (cost=0.42..2.85 rows=1 width=33) (actual time=0.066..0.394 rows=1 loops=16,822)

  • Index Cond: ((city_guid)::text = (alert.city_guid)::text)
  • Filter: ((country_guid)::text = '-9999'::text)
12. 1.209 658.714 ↑ 1.0 1 1

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

13. 3.443 657.505 ↑ 5.0 1,524 1

Hash Join (cost=13,613.79..177,934.76 rows=7,679 width=28) (actual time=19.836..657.505 rows=1,524 loops=1)

  • Hash Cond: ((alert_1.city_guid)::text = (city_1.city_guid)::text)
14. 4.493 636.384 ↑ 4.9 1,553 1

Nested Loop (cost=0.99..162,120.58 rows=7,679 width=61) (actual time=0.893..636.384 rows=1,553 loops=1)

15. 7.107 7.107 ↑ 1.1 18,376 1

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 time=0.015..7.107 rows=18,376 loops=1)

  • Index Cond: ((date_key)::text = '2019012218'::text)
16. 624.784 624.784 ↓ 0.0 0 18,376

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 time=0.032..0.034 rows=0 loops=18,376)

  • Index Cond: ((grid_guid)::text = (alert_1.grid_guid)::text)
  • Filter: ((grid_type >= 1) AND (grid_type <= 3))
  • Rows Removed by Filter: 1
17. 0.224 17.678 ↑ 703.2 346 1

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

  • Buckets: 8192 Batches: 8 Memory Usage: 12kB
18. 17.454 17.454 ↑ 703.2 346 1

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

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