explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KnUS

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

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

  • Group Key: art.cid, art.lease_id
2. 415.523 2,377.852 ↓ 7.1 361,492 1

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

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

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

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

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

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

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

6. 98.942 380.705 ↓ 6.0 90,467 3 / 3

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

  • Hash Cond: (art.ar_code_id = ac.id)
7. 269.036 281.623 ↑ 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=60.058..281.623 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=34,657
8. 12.587 12.587 ↑ 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.762..37.762 rows=271,704 loops=1)

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

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

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

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

  • Filter: ((cid = 13,531) AND (gl_group_type_id = 2))
  • Rows Removed by Filter: 160
11. 452.335 1,176.071 ↑ 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.012..0.013 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=115,359
12. 180.934 723.736 ↓ 0.0 0 271,401 / 3

BitmapOr (cost=2.10..2.10 rows=25 width=0) (actual time=0.008..0.008 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.102 0.227 ↑ 1.0 220 1

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

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

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

Planning time : 4.803 ms