explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n12T

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 657,115.118 1,198,305.741 ↑ 1.4 662,923 1

Insert on df_usage_audit (cost=89,163.29..130,983.14 rows=929,330 width=2,690) (actual time=1.560..1,198,305.741 rows=662,923 loops=1)

2.          

CTE result

3. 523,205.561 534,923.070 ↑ 1.4 662,923 1

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

4. 1,545.734 11,717.509 ↑ 1.4 662,923 1

Subquery Scan on *SELECT*_1 (cost=0.00..89,163.29 rows=929,330 width=3,058) (actual time=0.061..11,717.509 rows=662,923 loops=1)

5. 10,171.775 10,171.775 ↑ 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.054..10,171.775 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
6. 1,038.566 541,190.623 ↑ 1.4 662,923 1

Subquery Scan on *SELECT* (cost=0.00..41,819.85 rows=929,330 width=2,690) (actual time=1.466..541,190.623 rows=662,923 loops=1)

7. 540,152.057 540,152.057 ↑ 1.4 662,923 1

CTE Scan on result (cost=0.00..20,909.93 rows=929,330 width=596) (actual time=1.460..540,152.057 rows=662,923 loops=1)