explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mkPb

Settings
# exclusive inclusive rows x rows loops node
1. 44.658 297.549 ↓ 2.5 29,282 1

Gather (cost=4,273.81..25,727.80 rows=11,683 width=449) (actual time=37.877..297.549 rows=29,282 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 19.052 252.891 ↓ 2.1 14,641 2

Hash Left Join (cost=3,273.81..23,499.36 rows=6,872 width=449) (actual time=38.352..252.891 rows=14,641 loops=2)

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

Nested Loop Left Join (cost=1,225.56..21,347.17 rows=6,872 width=405) (actual time=15.360..211.248 rows=14,641 loops=2)

4. 9.210 38.034 ↓ 2.0 12,124 2

Hash Left Join (cost=1,225.13..3,315.51 rows=6,058 width=238) (actual time=15.301..38.034 rows=12,124 loops=2)

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

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

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

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

7. 0.008 0.056 ↑ 1.0 9 2

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

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

Nested Loop (cost=0.00..7.76 rows=9 width=32) (actual time=0.025..0.048 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.028 0.028 ↑ 1.0 9 2

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

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

Hash (cost=935.89..935.89 rows=22,509 width=77) (actual time=14.991..14.991 rows=22,499 loops=2)

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

Seq Scan on member_payment_details (cost=0.00..935.89 rows=22,509 width=77) (actual time=0.016..7.783 rows=22,499 loops=2)

  • Filter: (member_default IS TRUE)
  • Rows Removed by Filter: 3490
13. 0.013 0.013 ↑ 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.013 rows=1 loops=24,248)

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

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

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

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

Planning time : 1.158 ms
Execution time : 299.378 ms