explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7BWD

Settings
# exclusive inclusive rows x rows loops node
1. 0.455 66.228 ↑ 1.0 2,000 1

Limit (cost=1,002.40..7,751.80 rows=2,000 width=168) (actual time=9.342..66.228 rows=2,000 loops=1)

  • Buffers: shared hit=50,071
2. 31.515 65.773 ↑ 173.4 2,000 1

Gather Merge (cost=1,002.40..1,171,590.13 rows=346,872 width=168) (actual time=9.340..65.773 rows=2,000 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
  • Buffers: shared hit=50,071
3. 0.431 34.258 ↑ 199.3 1,024 2 / 2

Nested Loop Left Join (cost=2.40..1,121,160.86 rows=204,042 width=110) (actual time=0.219..34.258 rows=1,024 loops=2)

  • Buffers: shared hit=50,071
4. 1.132 28.705 ↑ 199.3 1,024 2 / 2

Nested Loop (cost=1.98..1,032,131.45 rows=204,042 width=109) (actual time=0.186..28.705 rows=1,024 loops=2)

  • Buffers: shared hit=41,939
5. 0.838 26.548 ↑ 199.3 1,024 2 / 2

Nested Loop (cost=1.83..940,091.42 rows=204,042 width=95) (actual time=0.160..26.548 rows=1,024 loops=2)

  • Buffers: shared hit=37,840
6. 0.904 24.686 ↑ 199.3 1,024 2 / 2

Nested Loop (cost=1.69..900,679.41 rows=204,042 width=95) (actual time=0.148..24.686 rows=1,024 loops=2)

  • Buffers: shared hit=33,741
7. 0.479 22.757 ↑ 199.3 1,024 2 / 2

Nested Loop (cost=1.55..867,548.47 rows=204,042 width=85) (actual time=0.129..22.757 rows=1,024 loops=2)

  • Buffers: shared hit=29,642
8. 0.595 16.131 ↑ 199.3 1,024 2 / 2

Nested Loop (cost=1.13..777,583.51 rows=204,042 width=67) (actual time=0.090..16.131 rows=1,024 loops=2)

  • Buffers: shared hit=21,439
9. 1.094 12.497 ↑ 592.9 1,520 2 / 2

Nested Loop (cost=0.85..511,759.83 rows=901,189 width=75) (actual time=0.065..12.497 rows=1,520 loops=2)

  • Buffers: shared hit=12,321
10. 0.767 0.767 ↑ 592.9 1,520 2 / 2

Parallel Index Scan Backward using entry_log_entry_time_idx on entry_log (cost=0.43..64,779.93 rows=901,189 width=39) (actual time=0.021..0.767 rows=1,520 loops=2)

  • Buffers: shared hit=162
11. 10.636 10.636 ↑ 1.0 1 3,039 / 2

Index Scan using member_plans_pkey on member_plans (cost=0.43..0.50 rows=1 width=52) (actual time=0.007..0.007 rows=1 loops=3,039)

  • Index Cond: (id = entry_log.member_plan_id)
  • Buffers: shared hit=12,159
12. 3.039 3.039 ↑ 1.0 1 3,039 / 2

Index Scan using access_types_pkey on access_types (cost=0.28..0.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=3,039)

  • Index Cond: (id = member_plans.access_type)
  • Filter: (company_id = 2)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=9,118
13. 6.147 6.147 ↑ 1.0 1 2,049 / 2

Index Scan using members_pkey on members (cost=0.42..0.44 rows=1 width=26) (actual time=0.006..0.006 rows=1 loops=2,049)

  • Index Cond: (id = member_plans.member_id)
  • Buffers: shared hit=8,203
14. 1.024 1.024 ↑ 1.0 1 2,049 / 2

Index Scan using gym_access_points_pkey on gym_access_points (cost=0.14..0.16 rows=1 width=26) (actual time=0.001..0.001 rows=1 loops=2,049)

  • Index Cond: (id = entry_log.gym_access_point)
  • Buffers: shared hit=4,099
15. 1.024 1.024 ↑ 1.0 1 2,049 / 2

Index Scan using gym_sections_pkey on gym_sections (cost=0.14..0.19 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=2,049)

  • Index Cond: (id = gym_access_points.gym_section_id)
  • Buffers: shared hit=4,099
16. 1.024 1.024 ↑ 1.0 1 2,049 / 2

Index Scan using gyms_pkey on gyms (cost=0.14..0.45 rows=1 width=22) (actual time=0.001..0.001 rows=1 loops=2,049)

  • Index Cond: (id = gym_sections.gym_id)
  • Buffers: shared hit=4,099
17. 5.123 5.123 ↑ 1.0 1 2,049 / 2

Index Scan using access_tags_pkey on access_tags (cost=0.42..0.44 rows=1 width=17) (actual time=0.005..0.005 rows=1 loops=2,049)

  • Index Cond: (id = entry_log.access_tag_id)
  • Buffers: shared hit=8,132