explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ICtG

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 9,571.841 ↑ 1.0 1 1

Result (cost=1,233,686.01..1,233,686.02 rows=1 width=8) (actual time=9,571.840..9,571.841 rows=1 loops=1)

2.          

Initplan (for Result)

3. 71.067 916.285 ↑ 1.0 1 1

Aggregate (cost=178,121.35..178,121.36 rows=1 width=8) (actual time=916.285..916.285 rows=1 loops=1)

4.          

CTE times

5. 475.537 682.804 ↑ 1.1 588,198 1

Bitmap Heap Scan on archive_event (cost=9,543.15..164,090.86 rows=623,577 width=8) (actual time=261.402..682.804 rows=588,198 loops=1)

  • Recheck Cond: (storage_id = 40)
  • Heap Blocks: exact=137203
6. 207.267 207.267 ↓ 1.1 665,332 1

Bitmap Index Scan on archive_event_f733a512 (cost=0.00..9,387.26 rows=623,577 width=0) (actual time=207.267..207.267 rows=665,332 loops=1)

  • Index Cond: (storage_id = 40)
7. 845.218 845.218 ↑ 1.1 588,198 1

CTE Scan on times (cost=0.00..12,471.54 rows=623,577 width=8) (actual time=261.405..845.218 rows=588,198 loops=1)

8. 0.004 8,655.548 ↑ 1.0 1 1

Aggregate (cost=1,055,564.65..1,055,564.66 rows=1 width=8) (actual time=8,655.548..8,655.548 rows=1 loops=1)

9.          

CTE untils

10. 8,655.543 8,655.543 ↓ 0.0 0 1

Seq Scan on archive_recpart (cost=0.00..1,055,500.25 rows=2,862 width=8) (actual time=8,655.543..8,655.543 rows=0 loops=1)

  • Filter: (filepath ~~ '/media/storage//media/storage/40%'::text)
  • Rows Removed by Filter: 28154473
11. 8,655.544 8,655.544 ↓ 0.0 0 1

CTE Scan on untils (cost=0.00..57.24 rows=2,862 width=8) (actual time=8,655.544..8,655.544 rows=0 loops=1)

Planning time : 0.374 ms
Execution time : 9,582.242 ms