explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G8U9

Settings
# exclusive inclusive rows x rows loops node
1. 0.134 23.544 ↓ 0.0 0 1

HashAggregate (cost=248,803.11..249,475.71 rows=67,260 width=8) (actual time=23.544..23.544 rows=0 loops=1)

  • Group Key: po_revision_branch_assoc.id_instan_branch, mv_scr_activity_stats.id_employee
2.          

CTE infras

3. 0.056 0.056 ↑ 1.0 500 1

Values Scan on "*VALUES*" (cost=0.00..6.25 rows=500 width=4) (actual time=0.002..0.056 rows=500 loops=1)

4. 0.000 23.410 ↓ 0.0 0 1

Nested Loop (cost=1,149.51..248,460.56 rows=67,260 width=8) (actual time=23.410..23.410 rows=0 loops=1)

5. 4.795 23.410 ↓ 0.0 0 1

Hash Join (cost=1,149.51..161,139.41 rows=7,015 width=55) (actual time=23.410..23.410 rows=0 loops=1)

  • Hash Cond: (mv_scr_activity_stats.id_infra_instan = infras.id_infra_instan)
6. 14.992 18.412 ↓ 1.0 47,764 1

Bitmap Heap Scan on mv_scr_activity_stats (cost=1,133.26..158,093.82 rows=45,526 width=51) (actual time=4.431..18.412 rows=47,764 loops=1)

  • Recheck Cond: (id_project_sub = 81,873)
  • Heap Blocks: exact=7,577
7. 3.420 3.420 ↓ 1.0 47,764 1

Bitmap Index Scan on idx_mv_scr_activity_stats_id_project_sub (cost=0.00..1,121.88 rows=45,526 width=0) (actual time=3.420..3.420 rows=47,764 loops=1)

  • Index Cond: (id_project_sub = 81,873)
8. 0.052 0.203 ↑ 1.0 500 1

Hash (cost=10.00..10.00 rows=500 width=4) (actual time=0.203..0.203 rows=500 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 26kB
9. 0.151 0.151 ↑ 1.0 500 1

CTE Scan on infras (cost=0.00..10.00 rows=500 width=4) (actual time=0.004..0.151 rows=500 loops=1)

10. 0.000 0.000 ↓ 0.0 0

Append (cost=0.00..12.42 rows=3 width=50) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Seq Scan on po_revision_branch_assoc (cost=0.00..0.00 rows=1 width=40) (never executed)

  • Filter: (bl_is_optimized AND (id_enterprise = 121) AND (mv_scr_activity_stats.id_infra_instan = id_infra_instan) AND (mv_scr_activity_stats.tx_revision = (tx_revision)::text))
12. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_po_revision_branch_assoc_121_infra_revision on po_revision_branch_assoc_121 (cost=0.69..12.42 rows=2 width=50) (never executed)

  • Index Cond: ((id_infra_instan = mv_scr_activity_stats.id_infra_instan) AND ((tx_revision)::text = mv_scr_activity_stats.tx_revision) AND (bl_is_optimized = true))
  • Filter: (bl_is_optimized AND (id_enterprise = 121))
Planning time : 1.918 ms
Execution time : 24.205 ms