explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PhnId

Settings
# exclusive inclusive rows x rows loops node
1. 0.040 17,070.483 ↓ 0.0 0 1

Sort (cost=496,537.77..496,537.80 rows=10 width=44) (actual time=17,070.482..17,070.483 rows=0 loops=1)

  • Sort Key: (sum(po_monthly_flart.nu_low_flart_files)) DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.004 17,070.443 ↓ 0.0 0 1

Limit (cost=496,537.48..496,537.51 rows=10 width=44) (actual time=17,070.442..17,070.443 rows=0 loops=1)

3. 0.023 17,070.439 ↓ 0.0 0 1

Sort (cost=496,537.48..496,625.70 rows=35,288 width=44) (actual time=17,070.438..17,070.439 rows=0 loops=1)

  • Sort Key: po_project_sub.id_project, (sum(po_monthly_flart.nu_low_flart_files)) DESC
  • Sort Method: quicksort Memory: 25kB
4. 0.079 17,070.416 ↓ 0.0 0 1

HashAggregate (cost=495,069.16..495,774.92 rows=35,288 width=44) (actual time=17,070.415..17,070.416 rows=0 loops=1)

  • Group Key: po_project_sub.id_project
5. 1.219 17,070.337 ↓ 0.0 0 1

Hash Join (cost=24,455.49..481,974.84 rows=748,247 width=24) (actual time=17,070.336..17,070.337 rows=0 loops=1)

  • Hash Cond: (po_proj_sub_infra.id_project_sub = po_project_sub.id_project_sub)
6. 0.003 16,779.154 ↓ 0.0 0 1

Hash Join (cost=19,747.25..466,978.20 rows=748,247 width=24) (actual time=16,779.153..16,779.154 rows=0 loops=1)

  • Hash Cond: (po_monthly_flart.id_infra_instan = po_proj_sub_infra.id_infra_instan)
7. 0.007 16,779.151 ↓ 0.0 0 1

Append (cost=6,932.15..426,076.51 rows=716,665 width=24) (actual time=16,779.150..16,779.151 rows=0 loops=1)

8. 7,906.101 7,978.046 ↓ 0.0 0 1

Bitmap Heap Scan on po_monthly_flart (cost=6,932.15..229,193.71 rows=337,424 width=24) (actual time=7,978.045..7,978.046 rows=0 loops=1)

  • Recheck Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
  • Filter: (id_enterprise = 83)
  • Heap Blocks: exact=81,274
9. 71.945 71.945 ↓ 1.0 372,299 1

Bitmap Index Scan on index_monthly_to_id_tseries (cost=0.00..6,847.80 rows=370,579 width=0) (actual time=71.944..71.945 rows=372,299 loops=1)

  • Index Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
10. 8,151.731 8,801.098 ↓ 0.0 0 1

Bitmap Heap Scan on po_monthly_flart_83 (cost=8,227.57..196,882.80 rows=379,241 width=24) (actual time=8,801.097..8,801.098 rows=0 loops=1)

  • Recheck Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
  • Filter: (id_enterprise = 83)
  • Heap Blocks: exact=76,417
11. 649.367 649.367 ↑ 1.0 372,299 1

Bitmap Index Scan on po_monthly_flart_83_id_tseries_idx (cost=0.00..8,132.76 rows=379,241 width=0) (actual time=649.366..649.367 rows=372,299 loops=1)

  • Index Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
12. 0.000 0.000 ↓ 0.0 0

Hash (cost=7,266.71..7,266.71 rows=443,871 width=8) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Seq Scan on po_proj_sub_infra (cost=0.00..7,266.71 rows=443,871 width=8) (never executed)

14. 144.318 289.964 ↑ 1.0 140,174 1

Hash (cost=2,955.33..2,955.33 rows=140,233 width=8) (actual time=289.963..289.964 rows=140,174 loops=1)

  • Buckets: 262,144 Batches: 1 Memory Usage: 7,524kB
15. 145.646 145.646 ↑ 1.0 140,174 1

Seq Scan on po_project_sub (cost=0.00..2,955.33 rows=140,233 width=8) (actual time=0.013..145.646 rows=140,174 loops=1)

Planning time : 6.599 ms
Execution time : 17,072.493 ms