explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gYFQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.039 23,292.932 ↑ 1.0 10 1

Sort (cost=975,720.67..975,720.69 rows=10 width=44) (actual time=23,292.921..23,292.932 rows=10 loops=1)

  • Sort Key: (sum(po_monthly_flart.nu_low_flart_files)) DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.023 23,292.893 ↑ 1.0 10 1

Limit (cost=975,720.38..975,720.40 rows=10 width=44) (actual time=23,292.862..23,292.893 rows=10 loops=1)

3. 0.380 23,292.870 ↑ 261.2 10 1

Sort (cost=975,720.38..975,726.91 rows=2,612 width=44) (actual time=23,292.859..23,292.870 rows=10 loops=1)

  • Sort Key: po_project_sub.id_project, (sum(po_monthly_flart.nu_low_flart_files)) DESC
  • Sort Method: top-N heapsort Memory: 25kB
4. 83.197 23,292.490 ↑ 8.3 315 1

GroupAggregate (cost=975,476.63..975,663.93 rows=2,612 width=44) (actual time=23,161.344..23,292.490 rows=315 loops=1)

  • Group Key: po_project_sub.id_project
5. 159.667 23,209.293 ↓ 10.4 70,026 1

Sort (cost=975,476.63..975,493.51 rows=6,753 width=24) (actual time=23,136.783..23,209.293 rows=70,026 loops=1)

  • Sort Key: po_project_sub.id_project
  • Sort Method: quicksort Memory: 8,543kB
6. 479.667 23,049.626 ↓ 10.4 70,026 1

Hash Join (cost=184,598.18..975,047.10 rows=6,753 width=24) (actual time=13,284.791..23,049.626 rows=70,026 loops=1)

  • Hash Cond: (po_monthly_flart.id_infra_instan = po_proj_sub_infra.id_infra_instan)
7. 748.936 20,789.719 ↓ 1.1 372,299 1

Append (cost=0.00..785,320.00 rows=337,426 width=24) (actual time=11,376.370..20,789.719 rows=372,299 loops=1)

8. 20,040.783 20,040.783 ↓ 1.1 372,299 1

Seq Scan on po_monthly_flart (cost=0.00..785,320.00 rows=337,426 width=24) (actual time=11,376.365..20,040.783 rows=372,299 loops=1)

  • Filter: ((id_enterprise = 83) AND (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day':
  • Rows Removed by Filter: 18,928,664
9. 25.322 1,780.240 ↓ 2.6 22,234 1

Hash (cost=184,491.83..184,491.83 rows=8,508 width=8) (actual time=1,780.239..1,780.240 rows=22,234 loops=1)

  • Buckets: 32,768 (originally 16384) Batches: 1 (originally 1) Memory Usage: 1,125kB
10. 478.295 1,754.918 ↓ 2.6 22,234 1

Hash Join (cost=175,475.52..184,491.83 rows=8,508 width=8) (actual time=861.424..1,754.918 rows=22,234 loops=1)

  • Hash Cond: (po_proj_sub_infra.id_project_sub = po_project_sub.id_project_sub)
11. 450.532 450.532 ↓ 1.0 443,935 1

Seq Scan on po_proj_sub_infra (cost=0.00..7,266.71 rows=443,871 width=8) (actual time=0.014..450.532 rows=443,935 loops=1)

12. 3.475 826.091 ↑ 1.1 2,482 1

Hash (cost=175,441.92..175,441.92 rows=2,688 width=8) (actual time=826.090..826.091 rows=2,482 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 129kB
13. 822.616 822.616 ↑ 1.1 2,482 1

Seq Scan on po_project_sub (cost=0.00..175,441.92 rows=2,688 width=8) (actual time=0.051..822.616 rows=2,482 loops=1)

  • Filter: (id_project = ANY ('{15905,9194,2719,2720,10187,10189,9695,9694,10470,10472,10498,10543,15829,15831,15832,15833,15835,15836,15837,15838,158
  • Rows Removed by Filter: 137,687
Planning time : 16.384 ms
Execution time : 23,294.370 ms