explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DzZO

Settings
# exclusive inclusive rows x rows loops node
1. 0.281 249,080.676 ↑ 1.0 100 1

Sort (cost=3,328,279.60..3,328,279.85 rows=100 width=214) (actual time=249,080.575..249,080.676 rows=100 loops=1)

  • Sort Key: filelevelflartdata."flartPct" DESC NULLS LAST
  • Sort Method: quicksort Memory: 48kB
2.          

CTE filelevelflartdata

3. 0.197 249,074.987 ↑ 1.0 100 1

Limit (cost=3,327,415.01..3,327,415.76 rows=100 width=179) (actual time=249,074.303..249,074.987 rows=100 loops=1)

4. 0.272 249,074.790 ↑ 249.8 100 1

Unique (cost=3,327,415.01..3,327,602.35 rows=24,978 width=179) (actual time=249,074.300..249,074.790 rows=100 loops=1)

5. 39,475.786 249,074.518 ↑ 177.1 141 1

Sort (cost=3,327,415.01..3,327,477.46 rows=24,978 width=179) (actual time=249,074.294..249,074.518 rows=141 loops=1)

  • Sort Key: mv_flart.tx_working_file, mv_flart.id_infra_instan, mv_flart.id_tseries DESC
  • Sort Method: external merge Disk: 423,496kB
6. 37,038.966 209,598.732 ↓ 96.2 2,401,995 1

Hash Join (cost=4,829.85..3,325,590.57 rows=24,978 width=179) (actual time=42,382.483..209,598.732 rows=2,401,995 loops=1)

  • Hash Cond: (mv_flart.id_infra_instan = po_proj_sub_infra.id_infra_instan)
7. 67,033.737 172,488.284 ↑ 1.0 35,661,959 1

Append (cost=0.00..2,963,642.76 rows=35,674,289 width=175) (actual time=42,285.263..172,488.284 rows=35,661,959 loops=1)

8. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on mv_flart (cost=0.00..0.00 rows=1 width=132) (actual time=0.005..0.006 rows=0 loops=1)

  • Filter: ((id_enterprise = 83) AND (id_tseries <= ('now'::cstring)::date))
9. 105,454.541 105,454.541 ↑ 1.0 35,661,959 1

Seq Scan on mv_flart_83 (cost=0.00..2,963,642.76 rows=35,674,288 width=175) (actual time=42,285.254..105,454.541 rows=35,661,959 loops=1)

  • Filter: ((id_enterprise = 83) AND (id_tseries <= ('now'::cstring)::date))
10. 4.540 71.482 ↓ 13.4 3,998 1

Hash (cost=4,826.13..4,826.13 rows=298 width=4) (actual time=71.481..71.482 rows=3,998 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 173kB
11. 8.426 66.942 ↓ 13.4 3,998 1

Nested Loop (cost=0.42..4,826.13 rows=298 width=4) (actual time=25.262..66.942 rows=3,998 loops=1)

12. 16.122 16.122 ↑ 1.0 94 1

Seq Scan on po_project_sub (cost=0.00..3,305.91 rows=94 width=4) (actual time=0.020..16.122 rows=94 loops=1)

  • Filter: (id_project = 10,450)
  • Rows Removed by Filter: 140,080
13. 42.394 42.394 ↓ 7.2 43 94

Index Scan using index_po_proj_sub_infra_id_project_sub on po_proj_sub_infra (cost=0.42..16.11 rows=6 width=8) (actual time=0.369..0.451 rows=43 loops=94)

  • Index Cond: (id_project_sub = po_project_sub.id_project_sub)
14. 0.332 249,080.395 ↑ 1.0 100 1

Nested Loop Left Join (cost=0.57..860.51 rows=100 width=214) (actual time=249,074.855..249,080.395 rows=100 loops=1)

15. 0.507 249,079.963 ↑ 1.0 100 1

Nested Loop (cost=0.42..843.00 rows=100 width=214) (actual time=249,074.847..249,079.963 rows=100 loops=1)

16. 249,075.256 249,075.256 ↑ 1.0 100 1

CTE Scan on filelevelflartdata (cost=0.00..2.00 rows=100 width=128) (actual time=249,074.309..249,075.256 rows=100 loops=1)

17. 4.200 4.200 ↑ 1.0 1 100

Index Scan using po_infra_instan_pkey on po_infra_instan infrainstandata (cost=0.42..8.40 rows=1 width=90) (actual time=0.041..0.042 rows=1 loops=100)

  • Index Cond: (id_infra_instan = filelevelflartdata."infraId")
18. 0.100 0.100 ↓ 0.0 0 100

Index Scan using po_discovery_config_id_discovery_config_uindex on po_discovery_config discoveryconfig (cost=0.15..0.17 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=100)

  • Index Cond: (infrainstandata.id_config = id_config)
Planning time : 102.888 ms
Execution time : 249,167.178 ms