# Optimizing Django REST Framework performance --- <!-- talk.1 --> ```python= class ClubSerializer(serializers.ModelSerializer): class Meta: model = Club fields = ("id", "name") class ClubViewSet(viewsets.ModelViewSet): queryset = Club.objects.all() serializer_class = ClubSerializer ``` --- ```python= def test_list(django_assert_num_queries, user): client = APIClient() client.force_authenticate(user=user) ClubFactory.create_batch(size=10) with django_assert_num_queries(3): client.get(reverse("talk:club-list")) ``` django_assert_num_queries :the_horns: --- ```sql= SELECT "clubs_club"."id", "clubs_club"."created", "clubs_club"."modified", "clubs_club"."name", "clubs_club"."email", "clubs_club"."description", "clubs_club"."membership_price", "clubs_club"."background_image", "clubs_club"."profile_image", "clubs_club"."process_payment", "clubs_club"."card_id", "clubs_club"."course_id", "clubs_club"."owner_id" FROM "clubs_club" ``` --- :thumbsup: --- ```python= class MembershipSerializer(serializers.ModelSerializer): class Meta: model = Membership fields = ("id", "user") class ClubSerializer(serializers.ModelSerializer): memberships = MembershipSerializer(many=True) class Meta: model = Club fields = ("id", "name", "memberships") ``` --- ```sql= SELECT "clubs_club"."id", "clubs_club"."created", "clubs_club"."modified", "clubs_club"."name", "clubs_club"."email", "clubs_club"."description", "clubs_club"."membership_price", "clubs_club"."background_image", "clubs_club"."profile_image", "clubs_club"."process_payment", "clubs_club"."card_id", "clubs_club"."course_id", "clubs_club"."owner_id" FROM "clubs_club" SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 1 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 2 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 3 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 4 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 5 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 6 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 7 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 8 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 9 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 10 ``` --- :thumbsdown: --- ## N+1 selects problem *Lazy* ORM + *Nested serializers* --- <!-- talk.2 --> ![](https://i.imgur.com/3pZPLdn.png) --- ```sql= SELECT "clubs_club"."id", "clubs_club"."created", "clubs_club"."modified", "clubs_club"."name", "clubs_club"."email", "clubs_club"."description", "clubs_club"."membership_price", "clubs_club"."background_image", "clubs_club"."profile_image", "clubs_club"."process_payment", "clubs_club"."card_id", "clubs_club"."course_id", "clubs_club"."owner_id" FROM "clubs_club" SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 1 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 21 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 21 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 20 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 20 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 19 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 19 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 18 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 18 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 17 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 17 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 16 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 16 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 15 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 15 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 14 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 14 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 13 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 13 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 12 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 12 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 2 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 31 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 31 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 30 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 30 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 29 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 29 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 28 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 28 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 27 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 27 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 26 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 26 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 25 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 25 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 24 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 24 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 23 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 23 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 22 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 22 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 3 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 41 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 41 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 40 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 40 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 39 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 39 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 38 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 38 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 37 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 37 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 36 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 36 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 35 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 35 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 34 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 34 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 33 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 33 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 32 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 32 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 4 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 51 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 51 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 50 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 50 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 49 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 49 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 48 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 48 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 47 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 47 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 46 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 46 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 45 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 45 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 44 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 44 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 43 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 43 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 42 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 42 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 5 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 61 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 61 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 60 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 60 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 59 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 59 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 58 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 58 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 57 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 57 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 56 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 56 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 55 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 55 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 54 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 54 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 53 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 53 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 52 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 52 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 6 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 71 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 71 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 70 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 70 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 69 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 69 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 68 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 68 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 67 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 67 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 66 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 66 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 65 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 65 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 64 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 64 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 63 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 63 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 62 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 62 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 7 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 81 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 81 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 80 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 80 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 79 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 79 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 78 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 78 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 77 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 77 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 76 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 76 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 75 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 75 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 74 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 74 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 73 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 73 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 72 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 72 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 8 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 91 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 91 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 90 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 90 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 89 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 89 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 88 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 88 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 87 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 87 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 86 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 86 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 85 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 85 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 84 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 84 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 83 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 83 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 82 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 82 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 9 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 101 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 101 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 100 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 100 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 99 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 99 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 98 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 98 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 97 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 97 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 96 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 96 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 95 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 95 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 94 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 94 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 93 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 93 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 92 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 92 SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" = 10 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 111 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 111 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 110 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 110 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 109 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 109 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 108 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 108 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 107 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 107 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 106 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 106 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 105 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 105 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 104 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 104 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 103 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 103 SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" = 102 SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" = 102 ``` --- ## 1 + 10 + 10 * 10 * 2 = 211 --- :thumbsdown: ![](https://media.giphy.com/media/10PcMWwtZSYk2k/giphy.gif) --- - *select_related* - one-to-one or many-to-one - *prefetch_related* - many-to-many or one-to-many - *Prefetch* - complex `prefetch_related` --- ![](https://i.imgur.com/A6hVx02.png) --- ```sql= SELECT "clubs_club"."id", "clubs_club"."created", "clubs_club"."modified", "clubs_club"."name", "clubs_club"."email", "clubs_club"."description", "clubs_club"."membership_price", "clubs_club"."background_image", "clubs_club"."profile_image", "clubs_club"."process_payment", "clubs_club"."card_id", "clubs_club"."course_id", "clubs_club"."owner_id" FROM "clubs_club" SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id" FROM "clubs_membership" WHERE "clubs_membership"."club_id" IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) SELECT "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email" FROM "users_user" WHERE "users_user"."id" IN (12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111) SELECT "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "users_profile" WHERE "users_profile"."user_id" IN (12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111) ``` --- :thumbsup: --- <!-- talk.3 --> ![](https://i.imgur.com/A6hVx02.png) --- :thumbsdown: --- [Link](http://ses4j.github.io/2015/11/23/optimizing-slow-django-rest-framework-performance/) ![](https://i.imgur.com/36Of8NC.png) --- ![](https://i.imgur.com/OebLyNa.png) --- ![](https://i.imgur.com/S4jfYs9.png) --- :thumbsup: --- ![](https://i.imgur.com/uk1qkxY.png) --- :thumbsdown: --- [Link](https://github.com/encode/django-rest-framework/issues/1964) ![](https://i.imgur.com/e5dnc7f.png) --- [Link](https://github.com/encode/django-rest-framework/issues/1977) ![](https://i.imgur.com/sVcoH49.png) --- :thumbsdown: --- ![](https://i.imgur.com/uk1qkxY.png) --- # WIP --- ![](https://i.imgur.com/FhNQPTZ.png) --- :thumbsup: --- :thumbsdown: --- ![](https://i.imgur.com/QFZV5g4.png) --- ![](https://i.imgur.com/YaiXO1k.png) ![](https://i.imgur.com/nohOHrh.png) --- ![](https://i.imgur.com/p3g4svE.png) --- ![](https://i.imgur.com/uYww4bJ.png) ![](https://i.imgur.com/p8r3GN9.png) --- :thumbsup: --- ```sql= SELECT "clubs_club"."id", "clubs_club"."created", "clubs_club"."modified", "clubs_club"."name", "clubs_club"."email", "clubs_club"."description", "clubs_club"."membership_price", "clubs_club"."background_image", "clubs_club"."profile_image", "clubs_club"."process_payment", "clubs_club"."card_id", "clubs_club"."course_id", "clubs_club"."owner_id" FROM "clubs_club" SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id", "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email", "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "clubs_membership" INNER JOIN "users_user" ON ("clubs_membership"."user_id" = "users_user"."id") LEFT OUTER JOIN "users_profile" ON ("users_user"."id" = "users_profile"."user_id") WHERE "clubs_membership"."club_id" IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) ``` --- ```sql= SELECT "clubs_club"."id", "clubs_club"."created", "clubs_club"."modified", "clubs_club"."name", "clubs_club"."email", "clubs_club"."description", "clubs_club"."membership_price", "clubs_club"."background_image", "clubs_club"."profile_image", "clubs_club"."process_payment", "clubs_club"."card_id", "clubs_club"."course_id", "clubs_club"."owner_id" FROM "clubs_club" ``` --- ```sql= SELECT "clubs_membership"."id", "clubs_membership"."created", "clubs_membership"."modified", "clubs_membership"."status", "clubs_membership"."status_changed", "clubs_membership"."user_id", "clubs_membership"."club_id", "users_user"."id", "users_user"."password", "users_user"."last_login", "users_user"."is_superuser", "users_user"."username", "users_user"."first_name", "users_user"."last_name", "users_user"."is_staff", "users_user"."is_active", "users_user"."date_joined", "users_user"."customer_id", "users_user"."email", "users_profile"."id", "users_profile"."user_id", "users_profile"."birth_date", "users_profile"."gender", "users_profile"."image", "users_profile"."ghin_number", "users_profile"."handicap_low", "users_profile"."handicap_current", "users_profile"."handicap_modified" FROM "clubs_membership" INNER JOIN "users_user" ON ( "clubs_membership"."user_id" = "users_user"."id" ) LEFT OUTER JOIN "users_profile" ON ( "users_user"."id" = "users_profile"."user_id" ) WHERE "clubs_membership"."club_id" IN ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ) ``` --- :thumbsup: --- ![](https://i.imgur.com/p3AQRla.png) --- ![](https://i.imgur.com/clgNdHL.png) --- :thumbsup: --- ![](https://i.imgur.com/R8jYIWL.png) --- :thumbsup: --- ![](https://i.imgur.com/JLs0FVl.png) --- ![](https://i.imgur.com/oICiqmg.png) --- ![](https://i.imgur.com/IoSwnAA.png) --- ## Next steps --- ### Add documentation and tests --- [Link](https://github.com/GeeWee/django-auto-prefetching) ![](https://i.imgur.com/yUBO7uy.png) ---
{"metaMigratedAt":"2023-06-14T22:57:30.560Z","metaMigratedFrom":"YAML","title":"Optimizing Django REST Framework performance","breaks":true,"description":"View the slide with \"Slide Mode\".","contributors":"[{\"id\":\"40b4439b-4f90-4448-8047-252c34ccd513\",\"add\":92724,\"del\":8250}]"}
    285 views