explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Im6b

Settings
# exclusive inclusive rows x rows loops node
1. 336.752 2,531.477 ↓ 1.4 70,142 1

GroupAggregate (cost=516,436.85..517,966.37 rows=50,984 width=40) (actual time=2,027.929..2,531.477 rows=70,142 loops=1)

  • Group Key: art.cid, art.lease_id
2. 421.890 2,194.725 ↓ 7.1 361,492 1

Sort (cost=516,436.85..516,564.31 rows=50,984 width=18) (actual time=2,027.914..2,194.725 rows=361,492 loops=1)

  • Sort Key: art.lease_id
  • Sort Method: quicksort Memory: 40,530kB
3. 343.469 1,772.835 ↓ 7.1 361,492 1

Hash Join (cost=6,133.83..512,450.47 rows=50,984 width=18) (actual time=67.322..1,772.835 rows=361,492 loops=1)

  • Hash Cond: (art.property_id = load_prop.property_id)
4. 0.000 1,429.136 ↓ 7.1 361,496 1

Gather (cost=6,121.88..511,737.49 rows=50,984 width=22) (actual time=67.083..1,429.136 rows=361,496 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 271.397 1,624.588 ↓ 5.7 120,499 3 / 3

Nested Loop (cost=5,121.88..505,639.09 rows=21,243 width=22) (actual time=61.856..1,624.588 rows=120,499 loops=3)

6. 89.775 358.054 ↓ 6.0 90,467 3 / 3

Hash Join (cost=5,119.78..403,986.05 rows=15,067 width=21) (actual time=61.749..358.054 rows=90,467 loops=3)

  • Hash Cond: (art.ar_code_id = ac.id)
7. 255.498 268.157 ↑ 1.2 90,467 3 / 3

Parallel Bitmap Heap Scan on ar_transactions art (cost=5,108.70..403,675.58 rows=111,498 width=25) (actual time=61.555..268.157 rows=90,467 loops=3)

  • Recheck Cond: (ar_code_type_id = 7)
  • Filter: ((post_date <= '2020-09-30'::date) AND (cid = 13,531))
  • Rows Removed by Filter: 101
  • Heap Blocks: exact=29,136
8. 12.659 12.659 ↑ 1.0 271,704 1 / 3

Bitmap Index Scan on idx_ar_transactions_ar_code_type_id (cost=0.00..5,041.80 rows=272,715 width=0) (actual time=37.975..37.976 rows=271,704 loops=1)

  • Index Cond: (ar_code_type_id = 7)
9. 0.015 0.122 ↑ 1.0 25 3 / 3

Hash (cost=10.78..10.78 rows=25 width=8) (actual time=0.122..0.122 rows=25 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
10. 0.107 0.107 ↑ 1.0 25 3 / 3

Seq Scan on ar_codes ac (cost=0.00..10.78 rows=25 width=8) (actual time=0.020..0.107 rows=25 loops=3)

  • Filter: ((cid = 13,531) AND (gl_group_type_id = 2))
  • Rows Removed by Filter: 160
11. 361.868 995.137 ↑ 21.0 1 271,401 / 3

Bitmap Heap Scan on ar_allocations aa (cost=2.10..6.54 rows=21 width=17) (actual time=0.010..0.011 rows=1 loops=271,401)

  • Recheck Cond: ((art.id = charge_ar_transaction_id) OR (art.id = credit_ar_transaction_id))
  • Filter: ((NOT is_deleted) AND (cid = 13,531))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=95,295
12. 90.467 633.269 ↓ 0.0 0 271,401 / 3

BitmapOr (cost=2.10..2.10 rows=25 width=0) (actual time=0.007..0.007 rows=0 loops=271,401)

13. 271.401 271.401 ↑ 5.0 1 271,401 / 3

Bitmap Index Scan on idx_ar_allocations_charge_ar_transaction_id (cost=0.00..0.99 rows=5 width=0) (actual time=0.003..0.003 rows=1 loops=271,401)

  • Index Cond: (art.id = charge_ar_transaction_id)
14. 271.401 271.401 ↑ 20.0 1 271,401 / 3

Bitmap Index Scan on idx_ar_allocations_credit_ar_transaction_id (cost=0.00..1.10 rows=20 width=0) (actual time=0.003..0.003 rows=1 loops=271,401)

  • Index Cond: (art.id = credit_ar_transaction_id)
15. 0.118 0.230 ↑ 1.0 220 1

Hash (cost=9.20..9.20 rows=220 width=4) (actual time=0.230..0.230 rows=220 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
16. 0.112 0.112 ↑ 1.0 220 1

Seq Scan on load_prop (cost=0.00..9.20 rows=220 width=4) (actual time=0.005..0.112 rows=220 loops=1)

Planning time : 4.856 ms