explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kf9g : Req WITH #1 - o

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.026 8,529.691 ↑ 1.0 1 1

Aggregate (cost=841,089.65..841,089.67 rows=1 width=88) (actual time=8,529.691..8,529.691 rows=1 loops=1)

2.          

CTE count_stats

3. 136.704 8,529.605 ↑ 1.0 1 1

Aggregate (cost=841,086.43..841,086.44 rows=1 width=8) (actual time=8,529.605..8,529.605 rows=1 loops=1)

4. 8,392.901 8,392.901 ↑ 1.0 1,840,360 1

Seq Scan on stats_wasac (cost=0.00..836,401.68 rows=1,873,899 width=4) (actual time=5.105..8,392.901 rows=1,840,360 loops=1)

  • Filter: (((action)::text = 'IAI_encart_nominal_bandeau'::text) AND (date_stat > (now() - '15 days'::interval)))
  • Rows Removed by Filter: 23741664
5.          

Initplan (forAggregate)

6. 0.015 0.015 ↓ 0.0 0 1

Seq Scan on admin_iai admin_iai_1 (cost=0.00..1.49 rows=1 width=66) (actual time=0.015..0.015 rows=0 loops=1)

  • Filter: ((cle)::text = 'RELEASE'::text)
  • Rows Removed by Filter: 39
7. 8,529.611 8,529.611 ↑ 1.0 1 1

CTE Scan on count_stats (cost=0.00..0.02 rows=1 width=8) (actual time=8,529.611..8,529.611 rows=1 loops=1)

8. 0.002 0.002 ↑ 1.0 1 1

CTE Scan on count_stats count_stats_1 (cost=0.00..0.02 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=1)

9. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on count_stats count_stats_2 (cost=0.00..0.02 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=1)

10. 0.037 0.037 ↑ 2.0 1 1

Seq Scan on admin_iai (cost=0.00..1.58 rows=2 width=90) (actual time=0.032..0.037 rows=1 loops=1)

  • Filter: (((cle)::text = 'MIN_REFRESH'::text) OR ((cle)::text = 'RELEASE'::text))
  • Rows Removed by Filter: 38