explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rQNO : Optimization for: Optimization for: plan #n12T; plan #E4f5

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 42,645.769 42,645.769 ↑ 1.4 662,923 1

CTE Scan on result (cost=89,163.29..107,749.89 rows=929,330 width=516) (actual time=0.219..42,645.769 rows=662,923 loops=1)

2.          

CTE result

3. 31,993.641 42,124.429 ↑ 1.4 662,923 1

Insert on df_usage (cost=0.00..89,163.29 rows=929,330 width=3,058) (actual time=0.217..42,124.429 rows=662,923 loops=1)

4. 1,273.883 10,130.788 ↑ 1.4 662,923 1

Subquery Scan on *SELECT* (cost=0.00..89,163.29 rows=929,330 width=3,058) (actual time=0.042..10,130.788 rows=662,923 loops=1)

5. 8,856.905 8,856.905 ↑ 1.4 662,923 1

Seq Scan on df_usage_archive (cost=0.00..65,930.04 rows=929,330 width=441) (actual time=0.037..8,856.905 rows=662,923 loops=1)

  • Filter: ((market_period_from <= '2050'::numeric) AND (market_period_to >= '1950'::numeric) AND ((status_ind)::text = 'ARCHIVED'::text) AND (((market)::text ~~* '%Lib%'::text) OR ((market)::text ~~* '%Gov%'::text) OR ((market)::text ~~* '%Bus%'::text) OR ((market)::text ~~* '%Univ%'::text) OR ((market)::text ~~* '%Sch%'::text)))
  • Rows Removed by Filter: 357070