explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gsv8

Settings
# exclusive inclusive rows x rows loops node
1. 0.083 81,921.864 ↑ 1.0 100 1

Sort (cost=3,324,769.68..3,324,769.93 rows=100 width=214) (actual time=81,921.854..81,921.864 rows=100 loops=1)

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

CTE filelevelflartdata

3. 0.006 81,914.257 ↑ 1.0 100 1

Limit (cost=3,323,905.09..3,323,905.84 rows=100 width=179) (actual time=81,914.152..81,914.257 rows=100 loops=1)

4. 0.029 81,914.251 ↑ 249.8 100 1

Unique (cost=3,323,905.09..3,324,092.44 rows=24,980 width=179) (actual time=81,914.150..81,914.251 rows=100 loops=1)

5. 30,384.512 81,914.222 ↑ 177.2 141 1

Sort (cost=3,323,905.09..3,323,967.54 rows=24,980 width=179) (actual time=81,914.150..81,914.222 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,488kB
6. 3,026.540 51,529.710 ↓ 96.2 2,401,995 1

Hash Join (cost=1,689.69..3,322,080.49 rows=24,980 width=179) (actual time=6.422..51,529.710 rows=2,401,995 loops=1)

  • Hash Cond: (mv_flart.id_infra_instan = po_proj_sub_infra.id_infra_instan)
7. 2,355.477 48,496.792 ↑ 1.0 35,661,959 1

Append (cost=0.00..2,963,396.20 rows=35,661,961 width=175) (actual time=0.024..48,496.792 rows=35,661,959 loops=1)

8. 0.003 0.003 ↓ 0.0 0 1

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

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

Seq Scan on mv_flart_83 (cost=0.00..2,963,396.20 rows=35,661,960 width=175) (actual time=0.021..46,141.312 rows=35,661,959 loops=1)

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

Hash (cost=1,685.97..1,685.97 rows=298 width=4) (actual time=6.378..6.378 rows=3,998 loops=1)

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

Nested Loop (cost=0.84..1,685.97 rows=298 width=4) (actual time=0.061..5.342 rows=3,998 loops=1)

12. 0.236 0.236 ↑ 1.0 94 1

Index Scan using po_project_sub_id_project on po_project_sub (cost=0.42..165.76 rows=94 width=4) (actual time=0.038..0.236 rows=94 loops=1)

  • Index Cond: (id_project = 10,450)
13. 4.230 4.230 ↓ 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.009..0.045 rows=43 loops=94)

  • Index Cond: (id_project_sub = po_project_sub.id_project_sub)
14. 0.037 81,921.781 ↑ 1.0 100 1

Nested Loop Left Join (cost=0.57..860.51 rows=100 width=214) (actual time=81,916.691..81,921.781 rows=100 loops=1)

15. 0.047 81,921.744 ↑ 1.0 100 1

Nested Loop (cost=0.42..843.00 rows=100 width=214) (actual time=81,916.687..81,921.744 rows=100 loops=1)

16. 81,914.297 81,914.297 ↑ 1.0 100 1

CTE Scan on filelevelflartdata (cost=0.00..2.00 rows=100 width=128) (actual time=81,914.156..81,914.297 rows=100 loops=1)

17. 7.400 7.400 ↑ 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.074..0.074 rows=1 loops=100)

  • Index Cond: (id_infra_instan = filelevelflartdata."infraId")
18. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=100)

  • Index Cond: (infrainstandata.id_config = id_config)
Planning time : 25.976 ms
Execution time : 82,000.869 ms