explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jW0 : pgstat

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 16,703.676 ↑ 704.0 15 1

Sort (cost=188,971.07..188,997.47 rows=10,560 width=22) (actual time=16,703.675..16,703.676 rows=15 loops=1)

  • Sort Key: view_groupy_proc_date_7days_prod._date, view_groupy_proc_date_7days_prod._proc
  • Sort Method: quicksort Memory: 26kB
2. 0.001 16,703.661 ↑ 704.0 15 1

Subquery Scan on view_groupy_proc_date_7days_prod (cost=187,755.45..188,265.32 rows=10,560 width=22) (actual time=16,703.632..16,703.661 rows=15 loops=1)

3. 0.027 16,703.660 ↑ 704.0 15 1

GroupAggregate (cost=187,755.45..188,159.72 rows=10,560 width=33) (actual time=16,703.632..16,703.660 rows=15 loops=1)

  • Group Key: tab_events_.k_proc, dd.dd, tab_events_.k_serw_name
4. 0.093 16,703.633 ↑ 291.4 82 1

Sort (cost=187,755.45..187,815.18 rows=23,894 width=25) (actual time=16,703.624..16,703.633 rows=82 loops=1)

  • Sort Key: tab_events_.k_proc, dd.dd, tab_events_.k_serw_name
  • Sort Method: quicksort Memory: 31kB
5. 11,788.943 16,703.540 ↑ 291.4 82 1

Nested Loop (cost=0.02..186,017.84 rows=23,894 width=25) (actual time=7,770.111..16,703.540 rows=82 loops=1)

  • Join Filter: (dd.dd = date_trunc('minute'::text, tab_events_.k_date))
  • Rows Removed by Join Filter: 34,476,614
6. 0.237 0.237 ↓ 7.2 36 1

Function Scan on generate_series dd (cost=0.02..15.02 rows=5 width=8) (actual time=0.161..0.237 rows=36 loops=1)

  • Filter: ((dd >= '2020-10-16 04:39:45.556+02'::timestamp with time zone) AND (dd <= '2020-10-16 10:39:45.556+02'::timestamp with time zone))
  • Rows Removed by Filter: 977
7. 4,536.560 4,914.360 ↓ 1.0 957,686 36

Materialize (cost=0.00..78,628.24 rows=955,748 width=25) (actual time=0.005..136.510 rows=957,686 loops=36)

8. 377.800 377.800 ↓ 1.0 957,686 1

Seq Scan on tab_events_ (cost=0.00..67,315.50 rows=955,748 width=25) (actual time=0.008..377.800 rows=957,686 loops=1)

  • Filter: (k_serw_name ~~ 'prod%'::text)
  • Rows Removed by Filter: 925,516
Planning time : 0.300 ms
Execution time : 16,714.645 ms