explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8Rw7

Settings
# exclusive inclusive rows x rows loops node
1. 7,331.170 148,064.153 ↓ 28.9 778,261 1

Unique (cost=726,770.85..726,972.63 rows=26,904 width=8) (actual time=97,069.461..148,064.153 rows=778,261 loops=1)

2. 86,656.032 140,732.983 ↓ 3,605.3 96,998,127 1

Sort (cost=726,770.85..726,838.11 rows=26,904 width=8) (actual time=97,069.460..140,732.983 rows=96,998,127 loops=1)

  • Sort Key: po_revision_branch_assoc.id_instan_branch, mv_scr_activity_stats.id_employee
  • Sort Method: external merge Disk: 1,705,928kB
3. 9,302.991 54,076.951 ↓ 3,605.3 96,998,127 1

Nested Loop (cost=1,133.26..724,791.32 rows=26,904 width=8) (actual time=11.210..54,076.951 rows=96,998,127 loops=1)

4. 537.689 544.496 ↓ 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=8.219..544.496 rows=47,764 loops=1)

  • Recheck Cond: (id_project_sub = 81,873)
  • Heap Blocks: exact=7,577
5. 6.807 6.807 ↓ 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=6.807..6.807 rows=47,764 loops=1)

  • Index Cond: (id_project_sub = 81,873)
6. 7,355.656 44,229.464 ↓ 677.0 2,031 47,764

Append (cost=0.00..12.42 rows=3 width=50) (actual time=0.051..0.926 rows=2,031 loops=47,764)

7. 0.000 0.000 ↓ 0.0 0 47,764

Seq Scan on po_revision_branch_assoc (cost=0.00..0.00 rows=1 width=40) (actual time=0.000..0.000 rows=0 loops=47,764)

  • 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))
8. 36,873.808 36,873.808 ↓ 1,015.5 2,031 47,764

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) (actual time=0.049..0.772 rows=2,031 loops=47,764)

  • 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 : 38.041 ms
Execution time : 148,300.556 ms