explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y9cB : pgstat

Settings
# exclusive inclusive rows x rows loops node
1. 3.941 11,994.768 ↓ 1.1 2,676 1

Sort (cost=1,113,552.85..1,113,558.95 rows=2,441 width=104) (actual time=11,994.572..11,994.768 rows=2,676 loops=1)

  • Sort Key: view_onstat_p.ts, (((view_onstat_p.hostname || ''::text) || view_onstat_p.ifx))
  • Sort Method: quicksort Memory: 306kB
2. 651.666 11,990.827 ↓ 1.1 2,676 1

Subquery Scan on view_onstat_p (cost=0.56..1,113,415.51 rows=2,441 width=104) (actual time=129.611..11,990.827 rows=2,676 loops=1)

  • Filter: ((view_onstat_p.ts >= '2020-10-16 01:49:34.815+02'::timestamp with time zone) AND (view_onstat_p.ts <= '2020-10-16 07:49:34.815+02'::timestamp with time zone) AND ((view_onstat_p.c_bufwaits - view_onstat_p.p_bufwaits) > '0'::numeric))
  • Rows Removed by Filter: 5,248,173
3. 5,912.458 11,339.161 ↑ 1.0 5,250,849 1

WindowAgg (cost=0.56..1,008,305.44 rows=5,254,283 width=990) (actual time=0.036..11,339.161 rows=5,250,849 loops=1)

4. 5,426.703 5,426.703 ↑ 1.0 5,250,849 1

Index Scan using idx_onstat_p_hostname_ifx_ts on onstat_p (cost=0.56..890,084.07 rows=5,254,283 width=30) (actual time=0.030..5,426.703 rows=5,250,849 loops=1)

Planning time : 0.434 ms
Execution time : 11,994.897 ms