explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jdus

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 915.055 ↓ 3.0 3 1

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

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

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

  • Hash Cond: (cc.collection_id = collection.id)
3. 43.302 898.432 ↓ 1.0 64,232 1

Unique (cost=15,564.06..16,992.85 rows=63,502 width=148) (actual time=621.775..898.432 rows=64,232 loops=1)

4. 763.788 855.130 ↓ 1.0 64,269 1

Sort (cost=15,564.06..15,722.81 rows=63,502 width=148) (actual time=621.774..855.130 rows=64,269 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. 24.681 91.342 ↓ 1.0 64,269 1

Append (cost=5.35..5,720.84 rows=63,502 width=148) (actual time=0.068..91.342 rows=64,269 loops=1)

6. 3.812 5.593 ↓ 1.0 6,323 1

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

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

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

8. 0.025 0.057 ↑ 1.0 60 1

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

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

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

10. 36.468 61.068 ↓ 1.0 57,946 1

Hash Left Join (cost=5.35..4,844.55 rows=57,185 width=551) (actual time=0.063..61.068 rows=57,946 loops=1)

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

Seq Scan on collection_report cr (cost=0.00..4,678.49 rows=57,185 width=463) (actual time=0.005..24.549 rows=57,946 loops=1)

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

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

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

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

14. 0.003 0.028 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.002 0.025 ↑ 1.0 1 1

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

16. 0.003 0.018 ↑ 2.0 1 1

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

17. 0.009 0.009 ↑ 12.0 1 1

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

  • Index Cond: (client_id = 64211)
18. 0.006 0.006 ↑ 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.006..0.006 rows=1 loops=1)

  • Index Cond: (application_id = application.obj_id)
19. 0.005 0.005 ↑ 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.005..0.005 rows=1 loops=1)

  • Index Cond: (billing_loan_id = loan.obj_id)