explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4YaCQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 65.160 ↑ 1.0 25 1

Limit (cost=0.43..14,305.99 rows=25 width=4) (actual time=44.335..65.16 rows=25 loops=1)

  • Buffers: shared hit=857
2. 0.091 65.124 ↑ 15,481.7 25 1

Nested Loop (cost=0.43..221,474,063.7 rows=387,042 width=4) (actual time=44.333..65.124 rows=25 loops=1)

  • Buffers: shared hit=857
3. 0.125 64.958 ↑ 154,816.9 25 1

Index Scan using id_service_id_in_p on carsharing_rental carsharing_rental (cost=0.43..220,318,179.54 rows=3,870,422 width=8) (actual time=44.306..64.958 rows=25 loops=1)

  • Index Cond: (carsharing_rental.in_progress = false)
  • Filter: ((NOT carsharing_rental.in_progress) AND ((upper((carsharing_rental.id)::text) ~~ 'TEST%'::text) OR (upper((carsharing_rental.event_id)::text) ~~ 'TEST%'::text) OR (SubPlan 1) OR (alternatives: SubPlan 2 or hashed SubPlan 3)))
  • Buffers: shared hit=856
4.          

SubPlan (forIndex Scan)

5. 0.062 20.832 ↑ 1.0 1 31

Nested Loop (cost=1.7..25.92 rows=1 width=0) (actual time=0.672..0.672 rows=1 loops=31)

  • Buffers: shared hit=496
6. 0.062 20.553 ↑ 1.0 1 31

Nested Loop (cost=1.27..25.34 rows=1 width=16) (actual time=0.663..0.663 rows=1 loops=31)

  • Buffers: shared hit=372
7. 0.093 20.367 ↑ 1.0 1 31

Nested Loop (cost=0.85..16.9 rows=1 width=4) (actual time=0.656..0.657 rows=1 loops=31)

  • Buffers: shared hit=248
8. 0.124 0.124 ↑ 1.0 1 31

Index Only Scan using carsharing_customer_pkey on carsharing_customer u0_1 (cost=0.42..8.44 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=31)

  • Index Cond: (u0_1.customer_ptr_id = carsharing_rental.customer_id)
  • Buffers: shared hit=124
9. 20.150 20.150 ↑ 1.0 1 31

Index Scan using common_customer_pkey on common_customer u1 (cost=0.42..8.44 rows=1 width=8) (actual time=0.65..0.65 rows=1 loops=31)

  • Index Cond: (u1.id = carsharing_rental.customer_id)
  • Buffers: shared hit=124
10. 0.124 0.124 ↑ 1.0 1 31

Index Scan using common_userprofile_pkey on common_userprofile u2 (cost=0.42..8.44 rows=1 width=20) (actual time=0.004..0.004 rows=1 loops=31)

  • Index Cond: (u2.id = u1.user_profile_id)
  • Buffers: shared hit=124
11. 0.217 0.217 ↑ 1.0 1 31

Index Scan using auth_user_pkey on auth_user u3 (cost=0.42..0.57 rows=1 width=35) (actual time=0.006..0.007 rows=1 loops=31)

  • Index Cond: (u3.id = u2.user_id)
  • Filter: ((upper((u2.phone_number)::text) ~~ '%TEST%'::text) OR (upper((u3.email)::text) ~~ 'TEST%'::text) OR (upper((u3.first_name)::text) ~~ 'TEST%'::text) OR (upper((u3.last_name)::text) ~~ 'TEST%'::text))
  • Buffers: shared hit=124
12. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.55..16.6 rows=1 width=0) (never executed)

13. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using carsharing_vehicle_pkey on carsharing_vehicle u0_2 (cost=0.27..8.29 rows=1 width=4) (never executed)

  • Index Cond: (u0_2.vehicle_ptr_id = carsharing_rental.vehicle_id)
14. 0.000 0.000 ↓ 0.0 0 0

Index Scan using common_vehicle_pkey on common_vehicle u1_1 (cost=0.28..8.31 rows=1 width=4) (never executed)

  • Index Cond: (u1_1.id = carsharing_rental.vehicle_id)
  • Filter: ((upper((u1_1.vin_number)::text) ~~ 'TEST%'::text) OR (upper((u1_1.license_plate_number)::text) ~~ '%TEST%'::text))
15. 0.003 44.001 ↓ 0.0 0 1

Hash Join (cost=104.3..501.97 rows=1 width=4) (actual time=44.001..44.001 rows=0 loops=1)

  • Buffers: shared hit=355
16. 43.998 43.998 ↓ 0.0 0 1

Seq Scan on common_vehicle u1_2 (cost=0..397.6 rows=28 width=4) (actual time=43.997..43.998 rows=0 loops=1)

  • Filter: ((upper((u1_2.vin_number)::text) ~~ 'TEST%'::text) OR (upper((u1_2.license_plate_number)::text) ~~ '%TEST%'::text))
  • Buffers: shared hit=355
17. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=103.02..103.02 rows=102 width=4) (never executed)

18. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on carsharing_vehicle u0_3 (cost=0..103.02 rows=102 width=4) (never executed)

19. 0.064 0.075 ↑ 3.3 6 25

Materialize (cost=0..10.3 rows=20 width=4) (actual time=0.001..0.003 rows=6 loops=25)

  • Buffers: shared hit=1
20. 0.011 0.011 ↑ 3.3 6 1

Seq Scan on common_service u0 (cost=0..10.2 rows=20 width=4) (actual time=0.008..0.011 rows=6 loops=1)

  • Buffers: shared hit=1