explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BnGZ

Settings
# exclusive inclusive rows x rows loops node
1. 3,787.280 20,010.895 ↑ 6,608.4 90 1

GroupAggregate (cost=25,278,579.13..25,492,692.73 rows=594,760 width=53) (actual time=16,071.522..20,010.895 rows=90 loops=1)

  • Group Key: file_data.id_infra_instan, file_data.tx_file_type, file_data.id_enterprise, file_data._week
2.          

CTE week_series

3. 0.066 0.066 ↑ 500.0 2 1

Result (cost=0.00..5.04 rows=1,000 width=4) (actual time=0.052..0.066 rows=2 loops=1)

4. 435.983 16,223.615 ↑ 35.7 166,760 1

Sort (cost=25,278,574.09..25,293,443.09 rows=5,947,600 width=93) (actual time=16,045.422..16,223.615 rows=166,760 loops=1)

  • Sort Key: file_data.id_infra_instan, file_data.tx_file_type, file_data.id_enterprise, file_data._week
  • Sort Method: quicksort Memory: 48,114kB
5. 334.784 15,787.632 ↑ 35.7 166,760 1

Subquery Scan on file_data (cost=23,501,496.32..24,304,419.82 rows=5,947,600 width=93) (actual time=14,218.129..15,787.632 rows=166,760 loops=1)

6. 672.793 15,452.848 ↑ 35.7 166,760 1

Unique (cost=23,501,496.32..24,244,943.82 rows=5,947,600 width=93) (actual time=14,218.125..15,452.848 rows=166,760 loops=1)

7. 12,246.277 14,780.055 ↑ 204.9 483,858 1

Sort (cost=23,501,496.32..23,749,312.15 rows=99,126,333 width=93) (actual time=14,218.118..14,780.055 rows=483,858 loops=1)

  • Sort Key: week_series._week, po_flart.tx_working_file
  • Sort Method: quicksort Memory: 130,156kB
8. 932.138 2,533.778 ↑ 204.9 483,858 1

Nested Loop (cost=0.00..5,253,987.86 rows=99,126,333 width=93) (actual time=44.904..2,533.778 rows=483,858 loops=1)

  • Join Filter: (po_flart.id_tseries <= week_series._week)
9. 0.078 0.078 ↑ 500.0 2 1

CTE Scan on week_series (cost=0.00..20.00 rows=1,000 width=4) (actual time=0.057..0.078 rows=2 loops=1)

10. 746.406 1,601.562 ↑ 1.2 241,929 2

Materialize (cost=0.00..794,026.31 rows=297,379 width=97) (actual time=22.420..800.781 rows=241,929 loops=2)

11. 439.982 855.156 ↑ 1.2 241,929 1

Append (cost=0.00..792,539.41 rows=297,379 width=97) (actual time=44.831..855.156 rows=241,929 loops=1)

12. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on po_flart (cost=0.00..0.00 rows=1 width=134) (actual time=0.004..0.005 rows=0 loops=1)

  • Filter: ((id_enterprise = 83) AND (id_infra_instan = 55,391))
13. 371.811 415.169 ↑ 1.2 241,929 1

Bitmap Heap Scan on po_flart_83 (cost=22,141.24..792,539.41 rows=297,378 width=97) (actual time=44.822..415.169 rows=241,929 loops=1)

  • Recheck Cond: (id_infra_instan = 55,391)
  • Filter: (id_enterprise = 83)
  • Heap Blocks: exact=9,071
14. 43.358 43.358 ↑ 1.2 241,929 1

Bitmap Index Scan on index_po_flart_83_id_infra_instan_id_screntry_idx (cost=0.00..22,066.90 rows=297,378 width=0) (actual time=43.357..43.358 rows=241,929 loops=1)

  • Index Cond: (id_infra_instan = 55,391)
Planning time : 110.100 ms
Execution time : 20,049.341 ms