explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GlD

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 1,103.582 ↓ 3.0 3 1

Sort (cost=18,016.03..18,016.04 rows=1 width=272) (actual time=1,103.582..1,103.582 rows=3 loops=1)

  • Sort Key: collection.billing_loan_id DESC, cc.create_time DESC
  • Sort Method: quicksort Memory: 27kB
2. 16.081 1,103.562 ↓ 3.0 3 1

Hash Join (cost=15,714.06..18,016.02 rows=1 width=272) (actual time=1,069.665..1,103.562 rows=3 loops=1)

  • Hash Cond: (cc.collection_id = collection.id)
3. 41.748 1,085.425 ↓ 1.0 64,231 1

Unique (cost=15,564.06..16,992.85 rows=63,502 width=148) (actual time=813.628..1,085.425 rows=64,231 loops=1)

4. 772.909 1,043.677 ↓ 1.0 64,268 1

Sort (cost=15,564.06..15,722.81 rows=63,502 width=148) (actual time=813.626..1,043.677 rows=64,268 loops=1)

  • Sort Key: cc.text, cc.collection_id, cc.init_obj_id, cc.create_time, ('comment'::text), p.name, p.obj_id, p.email
  • Sort Method: external merge Disk: 33048kB
5. 25.185 270.768 ↓ 1.0 64,268 1

Append (cost=5.35..5,720.84 rows=63,502 width=148) (actual time=1.208..270.768 rows=64,268 loops=1)

6. 4.053 11.842 ↓ 1.0 6,323 1

Hash Left Join (cost=5.35..241.27 rows=6,317 width=251) (actual time=1.207..11.842 rows=6,323 loops=1)

  • Hash Cond: (cc.init_obj_id = p.obj_id)
7. 7.250 7.250 ↓ 1.0 6,323 1

Seq Scan on collection_comment cc (cost=0.00..218.17 rows=6,317 width=163) (actual time=0.660..7.250 rows=6,323 loops=1)

8. 0.027 0.539 ↑ 1.0 60 1

Hash (cost=4.60..4.60 rows=60 width=56) (actual time=0.539..0.539 rows=60 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
9. 0.512 0.512 ↑ 1.0 60 1

Seq Scan on person p (cost=0.00..4.60 rows=60 width=56) (actual time=0.005..0.512 rows=60 loops=1)

10. 37.163 233.741 ↓ 1.0 57,945 1

Hash Left Join (cost=5.35..4,844.55 rows=57,185 width=551) (actual time=2.074..233.741 rows=57,945 loops=1)

  • Hash Cond: (cr.init_obj_id = p_1.obj_id)
11. 196.525 196.525 ↓ 1.0 57,945 1

Seq Scan on collection_report cr (cost=0.00..4,678.49 rows=57,185 width=463) (actual time=2.014..196.525 rows=57,945 loops=1)

  • Filter: ((comment IS NOT NULL) AND (comment <> ''::text))
  • Rows Removed by Filter: 71
12. 0.024 0.053 ↑ 1.0 60 1

Hash (cost=4.60..4.60 rows=60 width=56) (actual time=0.053..0.053 rows=60 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
13. 0.029 0.029 ↑ 1.0 60 1

Seq Scan on person p_1 (cost=0.00..4.60 rows=60 width=56) (actual time=0.004..0.029 rows=60 loops=1)

14. 0.004 2.056 ↑ 1.0 1 1

Hash (cost=149.98..149.98 rows=1 width=124) (actual time=2.056..2.056 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.004 2.052 ↑ 1.0 1 1

Nested Loop (cost=1.13..149.98 rows=1 width=124) (actual time=2.050..2.052 rows=1 loops=1)

16. 0.003 1.539 ↑ 2.0 1 1

Nested Loop (cost=0.84..149.31 rows=2 width=4) (actual time=1.538..1.539 rows=1 loops=1)

17. 1.041 1.041 ↑ 12.0 1 1

Index Scan using application_client_id_idx on application (cost=0.42..48.09 rows=12 width=4) (actual time=1.040..1.041 rows=1 loops=1)

  • Index Cond: (client_id = 64211)
18. 0.495 0.495 ↑ 1.0 1 1

Index Scan using billing_loan_application_id_uniq on billing_loan loan (cost=0.42..8.44 rows=1 width=8) (actual time=0.495..0.495 rows=1 loops=1)

  • Index Cond: (application_id = application.obj_id)
19. 0.509 0.509 ↑ 1.0 1 1

Index Scan using collection_billing_loan_id on collection (cost=0.29..0.33 rows=1 width=120) (actual time=0.508..0.509 rows=1 loops=1)

  • Index Cond: (billing_loan_id = loan.obj_id)