explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jjm4

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 6.891 ↓ 2.0 2 1

Sort (cost=1,089.59..1,089.59 rows=1 width=546) (actual time=6.891..6.891 rows=2 loops=1)

  • Sort Key: members.fname, members.sname, member_plans.plan_name
  • Sort Method: quicksort Memory: 26kB
2. 0.034 6.867 ↓ 2.0 2 1

Nested Loop Left Join (cost=1.29..1,089.58 rows=1 width=546) (actual time=1.741..6.867 rows=2 loops=1)

3. 0.006 6.825 ↓ 2.0 2 1

Nested Loop Left Join (cost=1.00..1,089.15 rows=1 width=446) (actual time=1.718..6.825 rows=2 loops=1)

  • Join Filter: (crm_gyms.company_id = crm_companies.id)
4. 0.018 6.813 ↓ 2.0 2 1

Nested Loop Left Join (cost=1.00..1,087.79 rows=1 width=442) (actual time=1.712..6.813 rows=2 loops=1)

  • Join Filter: (members.crm_owner = crm_gyms.id)
  • Rows Removed by Join Filter: 40
5. 0.005 6.779 ↓ 2.0 2 1

Nested Loop Left Join (cost=1.00..1,080.94 rows=1 width=430) (actual time=1.706..6.779 rows=2 loops=1)

6. 0.007 6.760 ↓ 2.0 2 1

Nested Loop Left Join (cost=0.71..1,080.60 rows=1 width=361) (actual time=1.698..6.760 rows=2 loops=1)

7. 0.013 6.739 ↓ 2.0 2 1

Nested Loop Left Join (cost=0.42..1,080.26 rows=1 width=216) (actual time=1.689..6.739 rows=2 loops=1)

8. 6.692 6.692 ↓ 2.0 2 1

Seq Scan on access_tags (cost=0.00..1,077.61 rows=1 width=41) (actual time=1.672..6.692 rows=2 loops=1)

  • Filter: ((string)::text = '1491028608'::text)
  • Rows Removed by Filter: 42713
9. 0.034 0.034 ↑ 1.0 1 2

Index Scan using member_plans_pkey on member_plans (cost=0.42..2.64 rows=1 width=199) (actual time=0.017..0.017 rows=1 loops=2)

  • Index Cond: (access_tags.member_plan = id)
  • Filter: (renewal_of IS NULL)
10. 0.014 0.014 ↑ 1.0 1 2

Index Scan using members_pkey on members (cost=0.29..0.35 rows=1 width=153) (actual time=0.007..0.007 rows=1 loops=2)

  • Index Cond: (id = member_plans.member_id)
11. 0.014 0.014 ↓ 0.0 0 2

Index Scan using member_payment_details_member_id on member_payment_details (cost=0.29..0.32 rows=1 width=77) (actual time=0.006..0.007 rows=0 loops=2)

  • Index Cond: (member_id = members.id)
  • Filter: (member_default IS TRUE)
12. 0.016 0.016 ↑ 1.8 21 2

Seq Scan on gyms crm_gyms (cost=0.00..6.38 rows=38 width=28) (actual time=0.003..0.008 rows=21 loops=2)

13. 0.006 0.006 ↑ 16.0 1 2

Seq Scan on companies crm_companies (cost=0.00..1.16 rows=16 width=20) (actual time=0.003..0.003 rows=1 loops=2)

14. 0.008 0.008 ↓ 0.0 0 2

Index Scan using files_pkey on files (cost=0.29..0.34 rows=1 width=44) (actual time=0.004..0.004 rows=0 loops=2)

  • Index Cond: (members.photo_id = id)
Planning time : 1.806 ms
Execution time : 7.082 ms