explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9oOU

Settings
# exclusive inclusive rows x rows loops node
1. 16.415 908.887 ↓ 3.0 3 1

Hash Join (cost=15,714.06..18,016.02 rows=1 width=268) (actual time=873.962..908.887 rows=3 loops=1)

  • Hash Cond: (cc.collection_id = collection.id)
2. 43.175 892.444 ↓ 1.0 64,232 1

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

3. 759.103 849.269 ↓ 1.0 64,269 1

Sort (cost=15,564.06..15,722.81 rows=63,502 width=148) (actual time=610.241..849.269 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
4. 24.633 90.166 ↓ 1.0 64,269 1

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

5. 3.788 5.548 ↓ 1.0 6,323 1

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

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

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

7. 0.025 0.057 ↑ 1.0 60 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
8. 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.003..0.032 rows=60 loops=1)

9. 36.042 59.985 ↓ 1.0 57,946 1

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

  • Hash Cond: (cr.init_obj_id = p_1.obj_id)
10. 23.893 23.893 ↓ 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..23.893 rows=57,946 loops=1)

  • Filter: ((comment IS NOT NULL) AND (comment <> ''::text))
  • Rows Removed by Filter: 71
11. 0.023 0.050 ↑ 1.0 60 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
12. 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)

13. 0.003 0.028 ↑ 1.0 1 1

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

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

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

15. 0.003 0.017 ↑ 2.0 1 1

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

16. 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)
17. 0.005 0.005 ↑ 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.005..0.005 rows=1 loops=1)

  • Index Cond: (application_id = application.obj_id)
18. 0.006 0.006 ↑ 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.004..0.006 rows=1 loops=1)

  • Index Cond: (billing_loan_id = loan.obj_id)