explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oNb

Settings
# exclusive inclusive rows x rows loops node
1. 48.957 309.478 ↓ 2.5 29,282 1

Gather (cost=4,291.36..25,746.37 rows=11,683 width=449) (actual time=40.483..309.478 rows=29,282 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 18.552 260.521 ↓ 2.1 14,641 2

Hash Left Join (cost=3,291.36..23,517.94 rows=6,872 width=449) (actual time=41.344..260.521 rows=14,641 loops=2)

  • Hash Cond: (members.photo_id = files.id)
3. 177.790 217.071 ↓ 2.1 14,641 2

Nested Loop Left Join (cost=1,243.11..21,365.74 rows=6,872 width=405) (actual time=16.013..217.071 rows=14,641 loops=2)

4. 8.987 39.267 ↓ 2.0 12,124 2

Hash Left Join (cost=1,242.68..3,334.08 rows=6,058 width=238) (actual time=15.913..39.267 rows=12,124 loops=2)

  • Hash Cond: (members.id = member_payment_details.member_id)
5. 9.651 14.678 ↓ 2.0 12,052 2

Hash Join (cost=7.88..1,998.74 rows=6,058 width=169) (actual time=0.130..14.678 rows=12,052 loops=2)

  • Hash Cond: (members.crm_owner = crm_gyms.id)
6. 4.968 4.968 ↑ 1.2 21,960 2

Parallel Seq Scan on members (cost=0.00..1,834.76 rows=25,576 width=153) (actual time=0.016..4.968 rows=21,960 loops=2)

7. 0.008 0.059 ↑ 1.0 9 2

Hash (cost=7.76..7.76 rows=9 width=32) (actual time=0.059..0.059 rows=9 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.004 0.051 ↑ 1.0 9 2

Nested Loop (cost=0.00..7.76 rows=9 width=32) (actual time=0.026..0.051 rows=9 loops=2)

9. 0.016 0.016 ↑ 1.0 1 2

Seq Scan on companies crm_companies (cost=0.00..1.20 rows=1 width=20) (actual time=0.014..0.016 rows=1 loops=2)

  • Filter: (id = 2)
  • Rows Removed by Filter: 20
10. 0.031 0.031 ↑ 1.0 9 2

Seq Scan on gyms crm_gyms (cost=0.00..6.47 rows=9 width=28) (actual time=0.010..0.031 rows=9 loops=2)

  • Filter: (company_id = 2)
  • Rows Removed by Filter: 29
11. 7.045 15.602 ↑ 1.0 22,499 2

Hash (cost=944.32..944.32 rows=23,239 width=77) (actual time=15.602..15.602 rows=22,499 loops=2)

  • Buckets: 32768 Batches: 1 Memory Usage: 2750kB
12. 8.557 8.557 ↑ 1.0 22,499 2

Seq Scan on member_payment_details (cost=0.00..944.32 rows=23,239 width=77) (actual time=0.017..8.557 rows=22,499 loops=2)

  • Filter: (member_default IS TRUE)
  • Rows Removed by Filter: 3490
13. 0.014 0.014 ↑ 3.0 1 24,248

Index Scan using member_plans_member_id on member_plans (cost=0.42..2.95 rows=3 width=183) (actual time=0.008..0.014 rows=1 loops=24,248)

  • Index Cond: (members.id = member_id)
  • Filter: (renewal_of IS NULL)
  • Rows Removed by Filter: 15
14. 12.646 24.898 ↓ 1.0 47,393 2

Hash (cost=1,455.89..1,455.89 rows=47,389 width=44) (actual time=24.898..24.898 rows=47,393 loops=2)

  • Buckets: 65536 Batches: 1 Memory Usage: 4208kB
15. 12.252 12.252 ↓ 1.0 47,393 2

Seq Scan on files (cost=0.00..1,455.89 rows=47,389 width=44) (actual time=0.035..12.252 rows=47,393 loops=2)

Planning time : 1.158 ms
Execution time : 311.343 ms