i really like your moc and ended up buying the instructions and the pieces for it, though i have a problem with the instructions. step numbers 58 through 61 have an issue that makes it impossible to build the lower rear of the torso as it's only showing the front side of the torso blocking the poisons of the parts ,leaving 13 pieces unused. if you can update the instructions fixing the problem thanks.
So some commenters told me this voting is about printed pieces and not 3d printed pieces, my bad. Though i agree pieces that are printed should be admitted from the search and is turned off by default when making an account. Also if by one day sticker pieces, 3d printed pieces, custom printed pieces,and prototype pieces, get included in the database(3d and custom prints will probably not get add due to not be official by Lego and showing prototypes and leaks is bad idea due to legal reasons) that is also turned off by default.
default
473.09 ms (72 queries
including 42 similar
and 34 duplicates
)
Query
Timeline
Time (ms)
Action
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "accounts_userplan"."user_id", "accounts_userplan"."plan_id", "accounts_userplan"."expiry_date", "accounts_userplan"."last_paid_date", "accounts_userplan"."is_subscription_active", "accounts_userplan"."subscription_period", "accounts_userplan"."payment_source", "accounts_userplan"."stripe_customer_id", "accounts_userplan"."stripe_subscription_id", "accounts_userplan"."paypal_subscription_id", "accounts_userplan"."base_free_plan_id", "accounts_userplan"."is_reminder_sent" FROM "auth_user" LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") WHERE ("auth_user"."is_active" AND "auth_user"."username" = 'Millennium1999 studios') LIMIT 21SELECT ••• FROM "auth_user" LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") WHERE ("auth_user"."is_active" AND "auth_user"."username" = 'Millennium1999 studios') LIMIT 21
8.81
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(327)
profile_user = get_object_or_404(ProxyUser, username=username)
SELECT ("auth_user_groups"."user_id") AS "_prefetch_related_val_user_id", "auth_group"."id", "auth_group"."name" FROM "auth_group" INNER JOIN "auth_user_groups" ON ("auth_group"."id" = "auth_user_groups"."group_id") WHERE "auth_user_groups"."user_id" IN (590284)SELECT ••• FROM "auth_group" INNER JOIN "auth_user_groups" ON ("auth_group"."id" = "auth_user_groups"."group_id") WHERE "auth_user_groups"."user_id" IN (590284)
2 similar queries.
Duplicated 2 times.
0.15
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(327)
profile_user = get_object_or_404(ProxyUser, username=username)
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors" FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21
6 similar queries.
Duplicated 6 times.
0.15
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(343)
context['designer_ga_tracking_id'] = profile_user.designer.get_ga_tracking_id()
SELECT "accounts_userplan"."user_id", "accounts_userplan"."plan_id", "accounts_userplan"."expiry_date", "accounts_userplan"."last_paid_date", "accounts_userplan"."is_subscription_active", "accounts_userplan"."subscription_period", "accounts_userplan"."payment_source", "accounts_userplan"."stripe_customer_id", "accounts_userplan"."stripe_subscription_id", "accounts_userplan"."paypal_subscription_id", "accounts_userplan"."base_free_plan_id", "accounts_userplan"."is_reminder_sent" FROM "accounts_userplan" WHERE "accounts_userplan"."user_id" = 590284 LIMIT 21SELECT ••• FROM "accounts_userplan" WHERE "accounts_userplan"."user_id" = 590284 LIMIT 21
0.14
Connection: default
Transaction status: In transaction
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(343)
context['designer_ga_tracking_id'] = profile_user.designer.get_ga_tracking_id()/home/nathan/rb/site/./lego/models/designers.py in get_ga_tracking_id(88)
if self.plan.is_designer():/usr/lib/python3.10/contextlib.py in inner(79)
return func(*args, **kwds)/home/nathan/venv_rb310/lib/python3.10/site-packages/annoying/fields.py in __get__(36)
.__get__(instance, instance_type)
SELECT "plans_plan"."id", "plans_plan"."type", "plans_plan"."version", "plans_plan"."stripe_id", "plans_plan"."paypal_id", "plans_plan"."cost_single", "plans_plan"."cost_monthly", "plans_plan"."cost_yearly" FROM "plans_plan" WHERE "plans_plan"."id" = 7 LIMIT 21SELECT ••• FROM "plans_plan" WHERE "plans_plan"."id" = 7 LIMIT 21
2 similar queries.
Duplicated 2 times.
0.07
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(343)
context['designer_ga_tracking_id'] = profile_user.designer.get_ga_tracking_id()/home/nathan/rb/site/./lego/models/designers.py in get_ga_tracking_id(88)
if self.plan.is_designer():/home/nathan/rb/site/./accounts/models/users.py in is_designer(381)
return self.plan.is_designer()
SELECT "accounts_userprofilesection"."id", "accounts_userprofilesection"."user_id", "accounts_userprofilesection"."section", "accounts_userprofilesection"."order", "accounts_userprofilesection"."options" FROM "accounts_userprofilesection" WHERE "accounts_userprofilesection"."user_id" = 590284 ORDER BY "accounts_userprofilesection"."order" ASCSELECT ••• FROM "accounts_userprofilesection" WHERE "accounts_userprofilesection"."user_id" = 590284 ORDER BY "accounts_userprofilesection"."order" ASC
0.27
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(351)
if len(context['sections']) == 0:
SELECT "lego_baseset"."id", "lego_baseset"."set_num", "lego_baseset"."name", "lego_baseset"."year", "lego_baseset"."theme_id", "lego_baseset"."set_type", "lego_baseset"."num_parts", "lego_baseset"."default_inventory_id", "lego_baseset"."is_active", "lego_baseset"."is_accessory", "lego_baseset"."added_dt", "lego_baseset"."added_by_id", "lego_baseset"."last_modified_dt", "lego_baseset"."last_modified_by_id", "lego_baseset"."last_checked_for_bi", "lego_baseset"."descr", "lego_baseset"."primary_photo_id", "lego_baseset"."is_gear", "lego_baseset"."is_book", "lego_baseset"."search_vector", "lego_baseset"."mfhash_vector", "lego_moc"."baseset_ptr_id", "lego_moc"."designer_id", "lego_moc"."detail_url", "lego_moc"."gallery_url", "lego_moc"."bi_url", "lego_moc"."cad_url", "lego_moc"."video", "lego_moc"."bi_type", "lego_moc"."is_for_sale", "lego_moc"."is_hosted", "lego_moc"."cost", "lego_moc"."currency_id", "lego_moc"."parent_set_1_id", "lego_moc"."parent_set_2_id", "lego_moc"."parent_set_3_id", "lego_moc"."parent_set_4_id", "lego_moc"."parent_set_5_id", "lego_moc"."parent_inv_1_id", "lego_moc"."parent_inv_2_id", "lego_moc"."parent_inv_3_id", "lego_moc"."parent_inv_4_id", "lego_moc"."parent_inv_5_id", "lego_moc"."parent_type", "lego_moc"."is_allowed_premium", "lego_moc"."is_locked", "lego_moc"."last_social_post", "lego_moc"."is_review_requested", "lego_theme"."id", "lego_theme"."parent_id", "lego_theme"."name", "lego_theme"."slug", "lego_theme"."set_count", "lego_theme"."t1_id", "lego_theme"."t1_name", "lego_theme"."t2_name", "lego_theme"."t3_name", "lego_theme"."lego_blurb", "lego_theme"."banner_img", "lego_theme"."descr", T5."id", T5."parent_id", T5."name", T5."slug", T5."set_count", T5."t1_id", T5."t1_name", T5."t2_name", T5."t3_name", T5."lego_blurb", T5."banner_img", T5."descr", T6."id", T6."parent_id", T6."name", T6."slug", T6."set_count", T6."t1_id", T6."t1_name", T6."t2_name", T6."t3_name", T6."lego_blurb", T6."banner_img", T6."descr", "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors", "accounts_userplan"."user_id", "accounts_userplan"."plan_id", "accounts_userplan"."expiry_date", "accounts_userplan"."last_paid_date", "accounts_userplan"."is_subscription_active", "accounts_userplan"."subscription_period", "accounts_userplan"."payment_source", "accounts_userplan"."stripe_customer_id", "accounts_userplan"."stripe_subscription_id", "accounts_userplan"."paypal_subscription_id", "accounts_userplan"."base_free_plan_id", "accounts_userplan"."is_reminder_sent", "plans_plan"."id", "plans_plan"."type", "plans_plan"."version", "plans_plan"."stripe_id", "plans_plan"."paypal_id", "plans_plan"."cost_single", "plans_plan"."cost_monthly", "plans_plan"."cost_yearly", T10."id", T10."set_num", T10."name", T10."year", T10."theme_id", T10."set_type", T10."num_parts", T10."default_inventory_id", T10."is_active", T10."is_accessory", T10."added_dt", T10."added_by_id", T10."last_modified_dt", T10."last_modified_by_id", T10."last_checked_for_bi", T10."descr", T10."primary_photo_id", T10."is_gear", T10."is_book", T10."search_vector", T10."mfhash_vector", "lego_setstatstotal"."set_id", "lego_setstatstotal"."hits", "lego_setstatstotal"."builds", "lego_setstatstotal"."likes", "lego_setstatstotal"."bi_downloads", "lego_setstatstotal"."featured_hits", "lego_setstatstotal"."user_hits" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_designer" ON ("lego_moc"."designer_id" = "lego_designer"."user_ptr_id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T5 ON ("lego_theme"."parent_id" = T5."id") LEFT OUTER JOIN "lego_theme" T6 ON (T5."parent_id" = T6."id") INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "lego_baseset" T10 ON ("lego_moc"."parent_set_1_id" = T10."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) ORDER BY "lego_setstatstotal"."likes" DESC LIMIT 6SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_designer" ON ("lego_moc"."designer_id" = "lego_designer"."user_ptr_id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T5 ON ("lego_theme"."parent_id" = T5."id") LEFT OUTER JOIN "lego_theme" T6 ON (T5."parent_id" = T6."id") INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "lego_baseset" T10 ON ("lego_moc"."parent_set_1_id" = T10."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) ORDER BY "lego_setstatstotal"."likes" DESCLIMIT 6
2.06
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1836)
mocs = Designer.get_liked_mocs(user.id, 6)/home/nathan/rb/site/./lego/models/designers.py in get_liked_mocs(180)
pop_mocs = list(qs[:limit])
SELECTDISTINCT ("taggit_taggeditem"."object_id") AS "_prefetch_related_val", "taggit_tag"."id", "taggit_tag"."name", "taggit_tag"."slug" FROM "taggit_tag" INNER JOIN "taggit_taggeditem" ON ("taggit_tag"."id" = "taggit_taggeditem"."tag_id") INNER JOIN "django_content_type" ON ("taggit_taggeditem"."content_type_id" = "django_content_type"."id") WHERE ("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'moc' AND "taggit_taggeditem"."object_id" IN (139552, 150788, 129064, 149833, 131692, 151533))SELECT ••• FROM "taggit_tag" INNER JOIN "taggit_taggeditem" ON ("taggit_tag"."id" = "taggit_taggeditem"."tag_id") INNER JOIN "django_content_type" ON ("taggit_taggeditem"."content_type_id" = "django_content_type"."id") WHERE ("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'moc' AND "taggit_taggeditem"."object_id" IN (139552, 150788, 129064, 149833, 131692, 151533))
0.40
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1836)
mocs = Designer.get_liked_mocs(user.id, 6)/home/nathan/rb/site/./lego/models/designers.py in get_liked_mocs(180)
pop_mocs = list(qs[:limit])
SELECT "lego_designerdiscount"."id", "lego_designerdiscount"."designer_id", "lego_designerdiscount"."name", "lego_designerdiscount"."start_date", "lego_designerdiscount"."end_date", "lego_designerdiscount"."discount_pct", "lego_designerdiscount"."mocs" FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T23:32:18.637326+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T23:32:18.637324+00:00'::timestamptz AND (mocs @> ANY (ARRAY[['139552', '150788', '131692', '151533', '149833', '129064']]::jsonb[])))SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T23:32:18.637326+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T23:32:18.637324+00:00'::timestamptz AND (mocs @> ANY (ARRAY[['139552', '150788', '131692', '151533', '149833', '129064']]::jsonb[])))
0.44
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1842)
Moc.attach_discount_to_mocs(mocs)/home/nathan/rb/site/./lego/models/sets.py in attach_discount_to_mocs(1531)
for discount in discounts:
SELECT "accounts_usersetting"."id", "accounts_usersetting"."user_id", "accounts_usersetting"."name", "accounts_usersetting"."value" FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" IN (590284))SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" IN (590284))
0.26
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1843)
Moc.attach_designer_plan_to_mocs(mocs)/home/nathan/rb/site/./lego/models/sets.py in attach_designer_plan_to_mocs(1550)
settings_map = {s.user_id: s.value['is_public_plan'] for s in settings}
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = 590284 LIMIT 21SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 590284 LIMIT 21
0.07
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1882)
badges = UserBadge.objects.filter(user=self.user).order_by('badge__num_users')[:6]
SELECT "accounts_usersetting"."id", "accounts_usersetting"."user_id", "accounts_usersetting"."name", "accounts_usersetting"."value" FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21
4 similar queries.
Duplicated 4 times.
0.07
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1884)
is_public_badges = user.get_privacy_option('is_public_badges')/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
options = self.get_privacy_options()/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)
SELECT "django_comments"."id", "django_comments"."content_type_id", "django_comments"."object_pk", "django_comments"."site_id", "django_comments"."user_id", "django_comments"."user_name", "django_comments"."user_email", "django_comments"."user_url", "django_comments"."comment", "django_comments"."submit_date", "django_comments"."ip_address", "django_comments"."is_public", "django_comments"."is_removed", "threadedcomments_comment"."comment_ptr_id", "threadedcomments_comment"."title", "threadedcomments_comment"."parent_id", "threadedcomments_comment"."last_child_id", "threadedcomments_comment"."tree_path", "threadedcomments_comment"."newest_activity", "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "accounts_userplan"."user_id", "accounts_userplan"."plan_id", "accounts_userplan"."expiry_date", "accounts_userplan"."last_paid_date", "accounts_userplan"."is_subscription_active", "accounts_userplan"."subscription_period", "accounts_userplan"."payment_source", "accounts_userplan"."stripe_customer_id", "accounts_userplan"."stripe_subscription_id", "accounts_userplan"."paypal_subscription_id", "accounts_userplan"."base_free_plan_id", "accounts_userplan"."is_reminder_sent", "plans_plan"."id", "plans_plan"."type", "plans_plan"."version", "plans_plan"."stripe_id", "plans_plan"."paypal_id", "plans_plan"."cost_single", "plans_plan"."cost_monthly", "plans_plan"."cost_yearly", "accounts_userprofile"."user_id", "accounts_userprofile"."last_mod_inv", "accounts_userprofile"."last_activity", "accounts_userprofile"."last_ip", "accounts_userprofile"."last_country_id", "accounts_userprofile"."last_agent", "accounts_userprofile"."is_email_verified", "accounts_userprofile"."is_email_idle", "accounts_userprofile"."email_last_clicked", "accounts_userprofile"."api_token", "accounts_userprofile"."real_name", "accounts_userprofile"."location", "accounts_userprofile"."brickset_url", "accounts_userprofile"."mocpages_url", "accounts_userprofile"."flickr_url", "accounts_userprofile"."eurobricks_url", "accounts_userprofile"."youtube_url", "accounts_userprofile"."bricklink_url", "accounts_userprofile"."brickowl_url", "accounts_userprofile"."bricksafe_url", "accounts_userprofile"."website_url", "accounts_userprofile"."facebook_url", "accounts_userprofile"."twitter_url", "accounts_userprofile"."karma", "accounts_userprofile"."trophy_badge_id", "accounts_userprofile"."comments", "accounts_userprofile"."mfhash_vector", "accounts_userprofile"."is_muted", "accounts_userprofile"."is_banned", "accounts_userprofile"."is_suspected_pirate", "accounts_userprofile"."muted_until", "accounts_userprofile"."blocked_operations", "accounts_userprofile"."is_guest", "accounts_userprofile"."guest_token" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") INNER JOIN "auth_user" ON ("django_comments"."user_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "accounts_userprofile" ON ("auth_user"."id" = "accounts_userprofile"."user_id") WHERE (NOT "django_comments"."is_removed" AND "django_comments"."user_id" = 590284) ORDER BY "django_comments"."submit_date" DESC LIMIT 5SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") INNER JOIN "auth_user" ON ("django_comments"."user_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "accounts_userprofile" ON ("auth_user"."id" = "accounts_userprofile"."user_id") WHERE (NOT "django_comments"."is_removed" AND "django_comments"."user_id" = 590284) ORDER BY "django_comments"."submit_date" DESCLIMIT 5
0.80
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1833)
return {'comments': (comments, len(comments))}
SELECT ("auth_user_groups"."user_id") AS "_prefetch_related_val_user_id", "auth_group"."id", "auth_group"."name" FROM "auth_group" INNER JOIN "auth_user_groups" ON ("auth_group"."id" = "auth_user_groups"."group_id") WHERE "auth_user_groups"."user_id" IN (590284)SELECT ••• FROM "auth_group" INNER JOIN "auth_user_groups" ON ("auth_group"."id" = "auth_user_groups"."group_id") WHERE "auth_user_groups"."user_id" IN (590284)
2 similar queries.
Duplicated 2 times.
0.10
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(357)
context.update(section.get_context(request, profile_user))/home/nathan/rb/site/./accounts/models/users.py in get_context(1833)
return {'comments': (comments, len(comments))}
SELECT "countries_plus_country"."iso", "countries_plus_country"."iso3", "countries_plus_country"."iso_numeric", "countries_plus_country"."fips", "countries_plus_country"."name", "countries_plus_country"."capital", "countries_plus_country"."area", "countries_plus_country"."population", "countries_plus_country"."continent", "countries_plus_country"."tld", "countries_plus_country"."currency_code", "countries_plus_country"."currency_symbol", "countries_plus_country"."currency_name", "countries_plus_country"."phone", "countries_plus_country"."postal_code_format", "countries_plus_country"."postal_code_regex", "countries_plus_country"."languages", "countries_plus_country"."geonameid", "countries_plus_country"."neighbours", "countries_plus_country"."equivalent_fips_code" FROM "countries_plus_country" WHERE "countries_plus_country"."iso" = 'US' LIMIT 21SELECT ••• FROM "countries_plus_country" WHERE "countries_plus_country"."iso" = 'US' LIMIT 21
0.12
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./rb/templatetags/rb_geo.py in geo_currency(20)
geo_data = user.geo.get_user_currency()/home/nathan/rb/site/./geo/geo.py in get_user_currency(252)
country = Country.objects.get(iso=country_code)
412
</a>
413
</li>
414
<li class="hidden-xs">
415
{% geo_currency request.user %}
416
</li>
417
{% comment %}
418
<li class="hidden-xs hidden-sm">
419
<a href={% if request.user.is_authenticated %}"{% url 'user_profile_settings' request.user.get_username %}#personalisation"{% else %}"#" onclick="return false;"{% endif %} title="All date/times are being converted to this timezone">{% get_user_timezone request.user %}</a>
SELECT "avatar_avatar"."id", "avatar_avatar"."user_id", "avatar_avatar"."primary", "avatar_avatar"."avatar", "avatar_avatar"."date_uploaded" FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
7 similar queries.
Duplicated 7 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
avatar_url = provider.get_avatar_url(user, size)/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
avatar = get_primary_avatar(user, size)/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]
SELECT "accounts_usersetting"."id", "accounts_usersetting"."user_id", "accounts_usersetting"."name", "accounts_usersetting"."value" FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21
4 similar queries.
Duplicated 4 times.
0.09
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)
16
<div class="container">
17
{% include 'accounts/includes/user_profile_mobile_menu.html' %}
18
<div class="row">
19
{% with profile_user.get_privacy_options as privacy_options %}
20
{% include "accounts/includes/user_profile_navbar.html" %}
SELECT "accounts_usersetting"."id", "accounts_usersetting"."user_id", "accounts_usersetting"."name", "accounts_usersetting"."value" FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21
4 similar queries.
Duplicated 4 times.
0.10
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)
SELECT "accounts_usersetting"."id", "accounts_usersetting"."user_id", "accounts_usersetting"."name", "accounts_usersetting"."value" FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 590284) LIMIT 21
4 similar queries.
Duplicated 4 times.
0.09
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)
7
{% url 'add_profile_avatar' request.user.get_username as url %}
8
{% include 'lego/includes/get_img_url_modal.html' with url=url %}
9
10
{% with profile_user.get_privacy_options as privacy_options %}
SELECT "avatar_avatar"."id", "avatar_avatar"."user_id", "avatar_avatar"."primary", "avatar_avatar"."avatar", "avatar_avatar"."date_uploaded" FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
7 similar queries.
Duplicated 7 times.
0.08
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
avatar_url = provider.get_avatar_url(user, size)/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
avatar = get_primary_avatar(user, size)/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]
10
{% with profile_user.get_privacy_options as privacy_options %}
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.17
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
SELECT "accounts_userstats"."id", "accounts_userstats"."user_id", "accounts_userstats"."num_profile_views", "accounts_userstats"."num_shopper_scans", "accounts_userstats"."total_is_stale", "accounts_userstats"."total_sets", "accounts_userstats"."total_loose_parts", "accounts_userstats"."total_lost_set_parts", "accounts_userstats"."total_figures", "accounts_userstats"."total_all_parts" FROM "accounts_userstats" WHERE "accounts_userstats"."user_id" = 590284 LIMIT 21SELECT ••• FROM "accounts_userstats" WHERE "accounts_userstats"."user_id" = 590284 LIMIT 21
0.13
Connection: default
Transaction status: In transaction
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/usr/lib/python3.10/contextlib.py in inner(79)
return func(*args, **kwds)/home/nathan/venv_rb310/lib/python3.10/site-packages/annoying/fields.py in __get__(36)
.__get__(instance, instance_type)
SELECT SUM("accounts_userlostpart"."lost_quantity") AS "lost_quantity__sum" FROM "accounts_userlostpart" WHERE "accounts_userlostpart"."user_id" = 590284SELECT ••• FROM "accounts_userlostpart" WHERE "accounts_userlostpart"."user_id" = 590284
1.01
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(84)
self.total_lost_set_parts = self.user.lost_parts.aggregate(Sum('lost_quantity'))['lost_quantity__sum'] or 0
SELECT SUM("accounts_userpart"."quantity") AS "quantity__sum" FROM "accounts_userpart" WHERE "accounts_userpart"."user_id" = 590284SELECT ••• FROM "accounts_userpart" WHERE "accounts_userpart"."user_id" = 590284
147.40
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(85)
self.total_loose_parts = self.user.parts.aggregate(Sum('quantity'))['quantity__sum'] or 0
create temporarytable temp_lostsetparts_590284 asselect min(list_id) as list_id, s2.set_id, ip2.part_id, ip2.color_id, ip2.is_spare, lp.lost_quantity
from accounts_userlostpart lp
join lego_invpart ip2 on ip2.id=lp.inv_part_id
join accounts_userset s2 on s2.inventory_id=ip2.inventory_id and s2.user_id=lp.user_id
where lp.user_id = 590284
and lp.grandparent_inventory_id isnull group by 2, 3, 4, 5, 6
createtemporarytable temp_lostsetparts_590284 asselect min(list_id) as list_id, s2.set_id, ip2.part_id, ip2.color_id, ip2.is_spare, lp.lost_quantity
from accounts_userlostpart lp
join lego_invpart ip2 on ip2.id=lp.inv_part_id
join accounts_userset s2 on s2.inventory_id=ip2.inventory_id and s2.user_id=lp.user_id
where lp.user_id = 590284
and lp.grandparent_inventory_id isnullgroup by 2, 3, 4, 5, 6
7.12
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(86)
self.total_all_parts = get_user_exact_parts_total(self.user)/home/nathan/rb/site/./lego/build/build.py in get_user_exact_parts_total(628)
sql = _get_user_myparts_sql(user, True, True, None, None, color_field, '', buildable_only=buildable_only, use_grouping=False, use_cached_data=False, build_options=build_options)/home/nathan/rb/site/./lego/build/build.py in _get_user_myparts_sql(367)
create_user_set_lost_parts_temp_table(user)/home/nathan/rb/site/./lego/build/build.py in create_user_set_lost_parts_temp_table(219)
run_dml(sql)/home/nathan/rb/site/./rb/utils.py in run_dml(693)
cursor.execute(sql, params)
setlocal enable_gathermerge=off;WITH lostfigparts AS MATERIALIZED /* 590284 */ (
select
invset2.id as invset_id,
ip2.part_id,
ip2.color_id,
lp.lost_quantity
from
accounts_userlostpart lp
join lego_invpart ip2 on ip2.id = lp.inv_part_id
join lego_inventory si2 on ip2.inventory_id = si2.id
join lego_invset invset2 on si2.set_id = invset2.inv_set_id
join accounts_userset s2 on s2.inventory_id = invset2.inventory_id and s2.user_id = lp.user_id
where
lp.user_id = 590284
and invset2.inventory_id = lp.grandparent_inventory_id
), myparts /* _get_user_myparts_sql */ AS MATERIALIZED (
SELECT p.part_id as part_group_id, color_id, quantity FROM (
SELECT 0 as set_id, 0 as part_id, 0 as color_id, 0 as quantity
WHERE 1=2 UNION ALLSELECT /* _get_user_set_parts_sql */ s.set_id, ip.part_id, c.id as color_id,
ip.quantity*s.quantity - coalesce(lp.lost_quantity,0) as quantity
FROM accounts_userset s
JOIN lego_invpart ip on ip.inventory_id=s.inventory_id and (s.include_spares ornot ip.is_spare)
JOIN lego_color c ON c.id = ip.color_id
LEFT OUTER JOIN temp_lostsetparts_590284 lp ON lp.list_id=s.list_id and lp.set_id=s.set_id and lp.part_id=ip.part_id
and lp.color_id=ip.color_id and lp.is_spare=ip.is_spare
WHERE s.user_id = 590284
UNION ALLSELECT s.set_id, ip.part_id, c.id as color_id,
ip.quantity*s.quantity*invset.quantity - coalesce(lp.lost_quantity,0) as quantity
FROM accounts_userset s
JOIN lego_invset invset ON invset.inventory_id=s.inventory_id
JOIN lego_inventory si ON si.set_id=invset.inv_set_id
and si.version = ( select max(version) from lego_inventory si2 where si.set_id=si2.set_id and si2.is_active )
JOIN lego_invpart ip on ip.inventory_id=si.id and (s.include_spares ornot ip.is_spare)
JOIN lego_color c ON c.id = ip.color_id
LEFT OUTER JOIN lostfigparts lp on lp.invset_id=invset.id and ip.part_id=lp.part_id and ip.color_id=lp.color_id
WHERE s.user_id = 590284
UNION ALLSELECT 0, ip.part_id, c.id as color_id, ip.quantity
FROM accounts_userpartlist pl
JOIN accounts_userpart ip on pl.user_id=ip.user_id and pl.id=ip.list_id
JOIN lego_color c ON c.id = ip.color_id
WHERE ip.user_id = 590284
) p
LEFT OUTER JOIN lego_partrelationshipflat f on p.part_id=f.part_id )
SELECT /* get_user_exact_parts_total */ coalesce(sum(my.quantity),0) as quantity
FROM myparts my
WHERE 1=1
setlocal enable_gathermerge=off;WITH lostfigparts AS MATERIALIZED /* 590284 */ (
select
invset2.id as invset_id,
ip2.part_id,
ip2.color_id,
lp.lost_quantity
from
accounts_userlostpart lp
join lego_invpart ip2 on ip2.id = lp.inv_part_id
join lego_inventory si2 on ip2.inventory_id = si2.id
join lego_invset invset2 on si2.set_id = invset2.inv_set_id
join accounts_userset s2 on s2.inventory_id = invset2.inventory_id and s2.user_id = lp.user_id
where
lp.user_id = 590284
and invset2.inventory_id = lp.grandparent_inventory_id
), myparts /* _get_user_myparts_sql */ AS MATERIALIZED (
SELECT ••• FROM (
SELECT 0 as set_id, 0 as part_id, 0 as color_id, 0 as quantity
WHERE 1=2 UNION ALLSELECT /* _get_user_set_parts_sql */ s.set_id, ip.part_id, c.id as color_id,
ip.quantity*s.quantity - coalesce(lp.lost_quantity,0) as quantity
FROM accounts_userset s
JOIN lego_invpart ip on ip.inventory_id=s.inventory_id and (s.include_spares ornot ip.is_spare)
JOIN lego_color c ON c.id = ip.color_id
LEFT OUTER JOIN temp_lostsetparts_590284 lp ON lp.list_id=s.list_id and lp.set_id=s.set_id and lp.part_id=ip.part_id
and lp.color_id=ip.color_id and lp.is_spare=ip.is_spare
WHERE s.user_id = 590284
UNION ALLSELECT s.set_id, ip.part_id, c.id as color_id,
ip.quantity*s.quantity*invset.quantity - coalesce(lp.lost_quantity,0) as quantity
FROM accounts_userset s
JOIN lego_invset invset ON invset.inventory_id=s.inventory_id
JOIN lego_inventory si ON si.set_id=invset.inv_set_id
and si.version = (select max(version) from lego_inventory si2 where si.set_id=si2.set_id and si2.is_active)
JOIN lego_invpart ip on ip.inventory_id=si.id and (s.include_spares ornot ip.is_spare)
JOIN lego_color c ON c.id = ip.color_id
LEFT OUTER JOIN lostfigparts lp on lp.invset_id=invset.id and ip.part_id=lp.part_id and ip.color_id=lp.color_id
WHERE s.user_id = 590284
UNION ALLSELECT 0, ip.part_id, c.id as color_id, ip.quantity
FROM accounts_userpartlist pl
JOIN accounts_userpart ip on pl.user_id=ip.user_id and pl.id=ip.list_id
JOIN lego_color c ON c.id = ip.color_id
WHERE ip.user_id = 590284
) p
LEFT OUTER JOIN lego_partrelationshipflat f on p.part_id=f.part_id )
SELECT /* get_user_exact_parts_total */ coalesce(sum(my.quantity),0) as quantity
FROM myparts my
WHERE 1=1
158.48
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(86)
self.total_all_parts = get_user_exact_parts_total(self.user)/home/nathan/rb/site/./lego/build/build.py in get_user_exact_parts_total(641)
data = run_sql(sql, {'user_id': user.id})/home/nathan/rb/site/./rb/utils.py in run_sql(664)
cursor.execute(sql, params)
SELECT SUM("accounts_userset"."quantity") AS "quantity__sum" FROM "accounts_userset" INNER JOIN "accounts_usersetlist" ON ("accounts_userset"."list_id" = "accounts_usersetlist"."id") INNER JOIN "lego_baseset" ON ("accounts_userset"."set_id" = "lego_baseset"."id") WHERE ("accounts_userset"."user_id" = 590284 AND "accounts_usersetlist"."user_id" = 590284 AND "lego_baseset"."set_type" IN ('Set', 'SubSet', 'BModel', 'MOC'))SELECT ••• FROM "accounts_userset" INNER JOIN "accounts_usersetlist" ON ("accounts_userset"."list_id" = "accounts_usersetlist"."id") INNER JOIN "lego_baseset" ON ("accounts_userset"."set_id" = "lego_baseset"."id") WHERE ("accounts_userset"."user_id" = 590284 AND "accounts_usersetlist"."user_id" = 590284 AND "lego_baseset"."set_type" IN ('Set', 'SubSet', 'BModel', 'MOC'))
5.09
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(87)
num_sets = self.user.get_num_sets()/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_sets(331)
total_sets = self.sets.filter(set__set_type__in=set_types, list__user=self).aggregate(Sum('quantity'))['quantity__sum'] or 0
SELECT "accounts_userset"."id", "accounts_userset"."user_id", "accounts_userset"."list_id", "accounts_userset"."set_id", "accounts_userset"."inventory_id", "accounts_userset"."quantity", "accounts_userset"."include_spares", "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "accounts_usersetlist"."id", "accounts_usersetlist"."user_id", "accounts_usersetlist"."name", "accounts_usersetlist"."descr", "accounts_usersetlist"."is_buildable", "accounts_usersetlist"."num_sets", "lego_baseset"."id", "lego_baseset"."set_num", "lego_baseset"."name", "lego_baseset"."year", "lego_baseset"."theme_id", "lego_baseset"."set_type", "lego_baseset"."num_parts", "lego_baseset"."default_inventory_id", "lego_baseset"."is_active", "lego_baseset"."is_accessory", "lego_baseset"."added_dt", "lego_baseset"."added_by_id", "lego_baseset"."last_modified_dt", "lego_baseset"."last_modified_by_id", "lego_baseset"."last_checked_for_bi", "lego_baseset"."descr", "lego_baseset"."primary_photo_id", "lego_baseset"."is_gear", "lego_baseset"."is_book", "lego_baseset"."search_vector", "lego_baseset"."mfhash_vector", "lego_theme"."id", "lego_theme"."parent_id", "lego_theme"."name", "lego_theme"."slug", "lego_theme"."set_count", "lego_theme"."t1_id", "lego_theme"."t1_name", "lego_theme"."t2_name", "lego_theme"."t3_name", "lego_theme"."lego_blurb", "lego_theme"."banner_img", "lego_theme"."descr", T7."id", T7."parent_id", T7."name", T7."slug", T7."set_count", T7."t1_id", T7."t1_name", T7."t2_name", T7."t3_name", T7."lego_blurb", T7."banner_img", T7."descr", T8."id", T8."parent_id", T8."name", T8."slug", T8."set_count", T8."t1_id", T8."t1_name", T8."t2_name", T8."t3_name", T8."lego_blurb", T8."banner_img", T8."descr", "lego_setphoto"."id", "lego_setphoto"."set_id", "lego_setphoto"."photo_type_id", "lego_setphoto"."submitted_by_id", "lego_setphoto"."timestamp", "lego_setphoto"."is_active", "lego_setphoto"."is_primary", T10."id", T10."set_num", T10."name", T10."year", T10."theme_id", T10."set_type", T10."num_parts", T10."default_inventory_id", T10."is_active", T10."is_accessory", T10."added_dt", T10."added_by_id", T10."last_modified_dt", T10."last_modified_by_id", T10."last_checked_for_bi", T10."descr", T10."primary_photo_id", T10."is_gear", T10."is_book", T10."search_vector", T10."mfhash_vector", "accounts_usersetnote"."id", "accounts_usersetnote"."user_set_id", "accounts_usersetnote"."is_used", "accounts_usersetnote"."location", "accounts_usersetnote"."notes" FROM "accounts_userset" INNER JOIN "auth_user" ON ("accounts_userset"."user_id" = "auth_user"."id") INNER JOIN "accounts_usersetlist" ON ("accounts_userset"."list_id" = "accounts_usersetlist"."id") INNER JOIN "lego_baseset" ON ("accounts_userset"."set_id" = "lego_baseset"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T7 ON ("lego_theme"."parent_id" = T7."id") LEFT OUTER JOIN "lego_theme" T8 ON (T7."parent_id" = T8."id") LEFT OUTER JOIN "lego_setphoto" ON ("lego_baseset"."primary_photo_id" = "lego_setphoto"."id") LEFT OUTER JOIN "lego_baseset" T10 ON ("lego_setphoto"."set_id" = T10."id") LEFT OUTER JOIN "accounts_usersetnote" ON ("accounts_userset"."id" = "accounts_usersetnote"."user_set_id") WHERE ("accounts_userset"."inventory_id" IN (SELECT U0."inventory_id" FROM "lego_invset" U0 INNER JOIN "lego_baseset" U1 ON (U0."inv_set_id" = U1."id") WHERE U1."set_type" = 'Figure') AND "accounts_userset"."user_id" = 590284)SELECT ••• FROM "accounts_userset" INNER JOIN "auth_user" ON ("accounts_userset"."user_id" = "auth_user"."id") INNER JOIN "accounts_usersetlist" ON ("accounts_userset"."list_id" = "accounts_usersetlist"."id") INNER JOIN "lego_baseset" ON ("accounts_userset"."set_id" = "lego_baseset"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T7 ON ("lego_theme"."parent_id" = T7."id") LEFT OUTER JOIN "lego_theme" T8 ON (T7."parent_id" = T8."id") LEFT OUTER JOIN "lego_setphoto" ON ("lego_baseset"."primary_photo_id" = "lego_setphoto"."id") LEFT OUTER JOIN "lego_baseset" T10 ON ("lego_setphoto"."set_id" = T10."id") LEFT OUTER JOIN "accounts_usersetnote" ON ("accounts_userset"."id" = "accounts_usersetnote"."user_set_id") WHERE ("accounts_userset"."inventory_id" IN (SELECT ••• FROM "lego_invset" U0 INNER JOIN "lego_baseset" U1 ON (U0."inv_set_id" = U1."id") WHERE U1."set_type" = 'Figure') AND "accounts_userset"."user_id" = 590284)
11.28
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(89)
inv_sets, user_sets = get_user_minifigs(self.user)/home/nathan/rb/site/./lego/build/build.py in get_user_minifigs(786)
for user_set in user_sets:
SELECT "lego_invset"."id", "lego_invset"."inventory_id", "lego_invset"."inv_set_id", "lego_invset"."quantity", "lego_inventory"."id", "lego_inventory"."set_id", "lego_inventory"."version", "lego_inventory"."name", "lego_inventory"."is_active", "lego_inventory"."num_parts", "lego_inventory"."num_versions", "lego_baseset"."id", "lego_baseset"."set_num", "lego_baseset"."name", "lego_baseset"."year", "lego_baseset"."theme_id", "lego_baseset"."set_type", "lego_baseset"."num_parts", "lego_baseset"."default_inventory_id", "lego_baseset"."is_active", "lego_baseset"."is_accessory", "lego_baseset"."added_dt", "lego_baseset"."added_by_id", "lego_baseset"."last_modified_dt", "lego_baseset"."last_modified_by_id", "lego_baseset"."last_checked_for_bi", "lego_baseset"."descr", "lego_baseset"."primary_photo_id", "lego_baseset"."is_gear", "lego_baseset"."is_book", "lego_baseset"."search_vector", "lego_baseset"."mfhash_vector", T4."id", T4."set_num", T4."name", T4."year", T4."theme_id", T4."set_type", T4."num_parts", T4."default_inventory_id", T4."is_active", T4."is_accessory", T4."added_dt", T4."added_by_id", T4."last_modified_dt", T4."last_modified_by_id", T4."last_checked_for_bi", T4."descr", T4."primary_photo_id", T4."is_gear", T4."is_book", T4."search_vector", T4."mfhash_vector", "lego_theme"."id", "lego_theme"."parent_id", "lego_theme"."name", "lego_theme"."slug", "lego_theme"."set_count", "lego_theme"."t1_id", "lego_theme"."t1_name", "lego_theme"."t2_name", "lego_theme"."t3_name", "lego_theme"."lego_blurb", "lego_theme"."banner_img", "lego_theme"."descr", T6."id", T6."parent_id", T6."name", T6."slug", T6."set_count", T6."t1_id", T6."t1_name", T6."t2_name", T6."t3_name", T6."lego_blurb", T6."banner_img", T6."descr", T7."id", T7."parent_id", T7."name", T7."slug", T7."set_count", T7."t1_id", T7."t1_name", T7."t2_name", T7."t3_name", T7."lego_blurb", T7."banner_img", T7."descr", "lego_set"."baseset_ptr_id", "lego_set"."start_date", "lego_set"."end_date" FROM "lego_invset" INNER JOIN "lego_inventory" ON ("lego_invset"."inventory_id" = "lego_inventory"."id") INNER JOIN "lego_baseset" ON ("lego_inventory"."set_id" = "lego_baseset"."id") INNER JOIN "lego_baseset" T4 ON ("lego_invset"."inv_set_id" = T4."id") INNER JOIN "lego_theme" ON (T4."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T6 ON ("lego_theme"."parent_id" = T6."id") LEFT OUTER JOIN "lego_theme" T7 ON (T6."parent_id" = T7."id") LEFT OUTER JOIN "lego_set" ON (T4."id" = "lego_set"."baseset_ptr_id") WHERE "lego_invset"."inventory_id" IN ( SELECT V0."inventory_id" FROM "accounts_userset" V0 WHERE (V0."inventory_id" IN (SELECT U0."inventory_id" FROM "lego_invset" U0 INNER JOIN "lego_baseset" U1 ON (U0."inv_set_id" = U1."id") WHERE U1."set_type" = 'Figure') AND V0."user_id" = 590284) )SELECT ••• FROM "lego_invset" INNER JOIN "lego_inventory" ON ("lego_invset"."inventory_id" = "lego_inventory"."id") INNER JOIN "lego_baseset" ON ("lego_inventory"."set_id" = "lego_baseset"."id") INNER JOIN "lego_baseset" T4 ON ("lego_invset"."inv_set_id" = T4."id") INNER JOIN "lego_theme" ON (T4."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T6 ON ("lego_theme"."parent_id" = T6."id") LEFT OUTER JOIN "lego_theme" T7 ON (T6."parent_id" = T7."id") LEFT OUTER JOIN "lego_set" ON (T4."id" = "lego_set"."baseset_ptr_id") WHERE "lego_invset"."inventory_id" IN (SELECT ••• FROM "accounts_userset" V0 WHERE (V0."inventory_id" IN (SELECT ••• FROM "lego_invset" U0 INNER JOIN "lego_baseset" U1 ON (U0."inv_set_id" = U1."id") WHERE U1."set_type" = 'Figure') AND V0."user_id" = 590284))
100.94
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(89)
inv_sets, user_sets = get_user_minifigs(self.user)/home/nathan/rb/site/./lego/build/build.py in get_user_minifigs(793)
for fig in user_inv_sets:
SELECT "accounts_userset"."id", "accounts_userset"."user_id", "accounts_userset"."list_id", "accounts_userset"."set_id", "accounts_userset"."inventory_id", "accounts_userset"."quantity", "accounts_userset"."include_spares", "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "accounts_usersetlist"."id", "accounts_usersetlist"."user_id", "accounts_usersetlist"."name", "accounts_usersetlist"."descr", "accounts_usersetlist"."is_buildable", "accounts_usersetlist"."num_sets", "lego_baseset"."id", "lego_baseset"."set_num", "lego_baseset"."name", "lego_baseset"."year", "lego_baseset"."theme_id", "lego_baseset"."set_type", "lego_baseset"."num_parts", "lego_baseset"."default_inventory_id", "lego_baseset"."is_active", "lego_baseset"."is_accessory", "lego_baseset"."added_dt", "lego_baseset"."added_by_id", "lego_baseset"."last_modified_dt", "lego_baseset"."last_modified_by_id", "lego_baseset"."last_checked_for_bi", "lego_baseset"."descr", "lego_baseset"."primary_photo_id", "lego_baseset"."is_gear", "lego_baseset"."is_book", "lego_baseset"."search_vector", "lego_baseset"."mfhash_vector", "lego_theme"."id", "lego_theme"."parent_id", "lego_theme"."name", "lego_theme"."slug", "lego_theme"."set_count", "lego_theme"."t1_id", "lego_theme"."t1_name", "lego_theme"."t2_name", "lego_theme"."t3_name", "lego_theme"."lego_blurb", "lego_theme"."banner_img", "lego_theme"."descr", T6."id", T6."parent_id", T6."name", T6."slug", T6."set_count", T6."t1_id", T6."t1_name", T6."t2_name", T6."t3_name", T6."lego_blurb", T6."banner_img", T6."descr", T7."id", T7."parent_id", T7."name", T7."slug", T7."set_count", T7."t1_id", T7."t1_name", T7."t2_name", T7."t3_name", T7."lego_blurb", T7."banner_img", T7."descr", "lego_setphoto"."id", "lego_setphoto"."set_id", "lego_setphoto"."photo_type_id", "lego_setphoto"."submitted_by_id", "lego_setphoto"."timestamp", "lego_setphoto"."is_active", "lego_setphoto"."is_primary", T9."id", T9."set_num", T9."name", T9."year", T9."theme_id", T9."set_type", T9."num_parts", T9."default_inventory_id", T9."is_active", T9."is_accessory", T9."added_dt", T9."added_by_id", T9."last_modified_dt", T9."last_modified_by_id", T9."last_checked_for_bi", T9."descr", T9."primary_photo_id", T9."is_gear", T9."is_book", T9."search_vector", T9."mfhash_vector", "accounts_usersetnote"."id", "accounts_usersetnote"."user_set_id", "accounts_usersetnote"."is_used", "accounts_usersetnote"."location", "accounts_usersetnote"."notes" FROM "accounts_userset" INNER JOIN "lego_baseset" ON ("accounts_userset"."set_id" = "lego_baseset"."id") INNER JOIN "auth_user" ON ("accounts_userset"."user_id" = "auth_user"."id") INNER JOIN "accounts_usersetlist" ON ("accounts_userset"."list_id" = "accounts_usersetlist"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T6 ON ("lego_theme"."parent_id" = T6."id") LEFT OUTER JOIN "lego_theme" T7 ON (T6."parent_id" = T7."id") LEFT OUTER JOIN "lego_setphoto" ON ("lego_baseset"."primary_photo_id" = "lego_setphoto"."id") LEFT OUTER JOIN "lego_baseset" T9 ON ("lego_setphoto"."set_id" = T9."id") LEFT OUTER JOIN "accounts_usersetnote" ON ("accounts_userset"."id" = "accounts_usersetnote"."user_set_id") WHERE ("lego_baseset"."set_type" = 'Figure' AND "accounts_userset"."user_id" = 590284)SELECT ••• FROM "accounts_userset" INNER JOIN "lego_baseset" ON ("accounts_userset"."set_id" = "lego_baseset"."id") INNER JOIN "auth_user" ON ("accounts_userset"."user_id" = "auth_user"."id") INNER JOIN "accounts_usersetlist" ON ("accounts_userset"."list_id" = "accounts_usersetlist"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T6 ON ("lego_theme"."parent_id" = T6."id") LEFT OUTER JOIN "lego_theme" T7 ON (T6."parent_id" = T7."id") LEFT OUTER JOIN "lego_setphoto" ON ("lego_baseset"."primary_photo_id" = "lego_setphoto"."id") LEFT OUTER JOIN "lego_baseset" T9 ON ("lego_setphoto"."set_id" = T9."id") LEFT OUTER JOIN "accounts_usersetnote" ON ("accounts_userset"."id" = "accounts_usersetnote"."user_set_id") WHERE ("lego_baseset"."set_type" = 'Figure' AND "accounts_userset"."user_id" = 590284)
2.87
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(90)
self.total_figures = sum([s.quantity for s in inv_sets]) + sum([s.quantity for s in user_sets])
SELECT "lego_baseset"."id", "lego_baseset"."set_num", "lego_baseset"."name", "lego_baseset"."year", "lego_baseset"."theme_id", "lego_baseset"."set_type", "lego_baseset"."num_parts", "lego_baseset"."default_inventory_id", "lego_baseset"."is_active", "lego_baseset"."is_accessory", "lego_baseset"."added_dt", "lego_baseset"."added_by_id", "lego_baseset"."last_modified_dt", "lego_baseset"."last_modified_by_id", "lego_baseset"."last_checked_for_bi", "lego_baseset"."descr", "lego_baseset"."primary_photo_id", "lego_baseset"."is_gear", "lego_baseset"."is_book", "lego_baseset"."search_vector", "lego_baseset"."mfhash_vector", "lego_set"."baseset_ptr_id", "lego_set"."start_date", "lego_set"."end_date" FROM "lego_set" INNER JOIN "lego_baseset" ON ("lego_set"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_set"."baseset_ptr_id" IN (53722)SELECT ••• FROM "lego_set" INNER JOIN "lego_baseset" ON ("lego_set"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_set"."baseset_ptr_id" IN (53722)
0.15
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(90)
self.total_figures = sum([s.quantity for s in inv_sets]) + sum([s.quantity for s in user_sets])
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_parts_summary(380)
return self.stats.get_num_parts_summary()/home/nathan/rb/site/./accounts/models/stats.py in get_num_parts_summary(103)
self.recalculate_stats()/home/nathan/rb/site/./accounts/models/stats.py in recalculate_stats(93)
self.save()
SELECT COUNT(*) AS "__count" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284)SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284)
0.31
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_mocs(866)
self._num_mocs = Moc.objects.filter(designer=self.designer).count()
60
</a>
61
{% endif %}
62
63
{% if profile_user.get_num_mocs > 0 %}
64
{% with profile_user.designer.get_stats as designer_stats %}
SELECT SUM("lego_setstatstotal"."likes") AS "likes__sum" FROM "lego_setstatstotal" WHERE "lego_setstatstotal"."set_id" IN ( SELECT U0."baseset_ptr_id" FROM "lego_moc" U0 INNER JOIN "lego_baseset" U1 ON (U0."baseset_ptr_id" = U1."id") WHERE (U1."is_active" AND U0."designer_id" = 590284) )SELECT ••• FROM "lego_setstatstotal" WHERE "lego_setstatstotal"."set_id" IN (SELECT ••• FROM "lego_moc" U0 INNER JOIN "lego_baseset" U1 ON (U0."baseset_ptr_id" = U1."id") WHERE (U1."is_active" AND U0."designer_id" = 590284))
0.34
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./lego/models/designers.py in get_stats(79)
num_likes = SetStatsTotal.objects.filter(set__in=Moc.objects.filter(designer=self)).aggregate(Sum('likes'))['likes__sum'] or 0
61
{% endif %}
62
63
{% if profile_user.get_num_mocs > 0 %}
64
{% with profile_user.designer.get_stats as designer_stats %}
SELECT COUNT(*) AS "__count" FROM "lego_designerfollower" WHERE "lego_designerfollower"."designer_id" = 590284SELECT ••• FROM "lego_designerfollower" WHERE "lego_designerfollower"."designer_id" = 590284
0.21
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./lego/models/designers.py in get_stats(82)
'num_followers': self.get_num_followers_formatted(),/home/nathan/rb/site/./lego/models/designers.py in get_num_followers_formatted(231)
i = DesignerFollower.objects.filter(designer_id=self.id).count()
61
{% endif %}
62
63
{% if profile_user.get_num_mocs > 0 %}
64
{% with profile_user.designer.get_stats as designer_stats %}
SELECT COUNT(*) AS "__count" FROM "accounts_usertrophy" WHERE "accounts_usertrophy"."user_id" = 590284SELECT ••• FROM "accounts_usertrophy" WHERE "accounts_usertrophy"."user_id" = 590284
2 similar queries.
Duplicated 2 times.
0.09
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)
SELECT 1 AS "a" FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 139552 LIMIT 1SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 139552 LIMIT 1
2 similar queries.
0.10
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_moc(78)
return render_to_string('sets/render_set.html', {'set': set,/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():
181
{% endwith %}
182
{% else %}
183
{# repeat alt label check here so dont have to recalculate discount #}
184
{% if set.is_moc and set.get_moc.is_alternate %}
185
<span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
SELECT 1 AS "a" FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 150788 LIMIT 1SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 150788 LIMIT 1
2 similar queries.
0.07
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_moc(78)
return render_to_string('sets/render_set.html', {'set': set,/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():
181
{% endwith %}
182
{% else %}
183
{# repeat alt label check here so dont have to recalculate discount #}
184
{% if set.is_moc and set.get_moc.is_alternate %}
185
<span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
SELECT "accounts_userbadge"."id", "accounts_userbadge"."user_id", "accounts_userbadge"."badge_id" FROM "accounts_userbadge" INNER JOIN "lego_badge" ON ("accounts_userbadge"."badge_id" = "lego_badge"."id") WHERE "accounts_userbadge"."user_id" = 590284 ORDER BY "lego_badge"."num_users" ASC LIMIT 6SELECT ••• FROM "accounts_userbadge" INNER JOIN "lego_badge" ON ("accounts_userbadge"."badge_id" = "lego_badge"."id") WHERE "accounts_userbadge"."user_id" = 590284 ORDER BY "lego_badge"."num_users" ASCLIMIT 6
1.12
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)
10
{% include 'accounts/includes/user_profile_section_menu.html' %}
SELECT "avatar_avatar"."id", "avatar_avatar"."user_id", "avatar_avatar"."primary", "avatar_avatar"."avatar", "avatar_avatar"."date_uploaded" FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
7 similar queries.
Duplicated 7 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
avatar_url = provider.get_avatar_url(user, size)/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
avatar = get_primary_avatar(user, size)/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors" FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21
6 similar queries.
Duplicated 6 times.
0.18
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.16
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.14
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT "avatar_avatar"."id", "avatar_avatar"."user_id", "avatar_avatar"."primary", "avatar_avatar"."avatar", "avatar_avatar"."date_uploaded" FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
7 similar queries.
Duplicated 7 times.
0.09
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
avatar_url = provider.get_avatar_url(user, size)/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
avatar = get_primary_avatar(user, size)/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors" FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21
6 similar queries.
Duplicated 6 times.
0.11
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.15
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT "avatar_avatar"."id", "avatar_avatar"."user_id", "avatar_avatar"."primary", "avatar_avatar"."avatar", "avatar_avatar"."date_uploaded" FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
7 similar queries.
Duplicated 7 times.
0.08
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
avatar_url = provider.get_avatar_url(user, size)/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
avatar = get_primary_avatar(user, size)/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors" FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21
6 similar queries.
Duplicated 6 times.
0.11
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT "avatar_avatar"."id", "avatar_avatar"."user_id", "avatar_avatar"."primary", "avatar_avatar"."avatar", "avatar_avatar"."date_uploaded" FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
7 similar queries.
Duplicated 7 times.
0.08
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
avatar_url = provider.get_avatar_url(user, size)/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
avatar = get_primary_avatar(user, size)/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors" FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21
6 similar queries.
Duplicated 6 times.
0.10
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT "avatar_avatar"."id", "avatar_avatar"."user_id", "avatar_avatar"."primary", "avatar_avatar"."avatar", "avatar_avatar"."date_uploaded" FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 590284 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
7 similar queries.
Duplicated 7 times.
0.08
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
avatar_url = provider.get_avatar_url(user, size)/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
avatar = get_primary_avatar(user, size)/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors" FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 590284 LIMIT 21
6 similar queries.
Duplicated 6 times.
0.09
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT 1 AS "a" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 590284) LIMIT 1
11 similar queries.
Duplicated 11 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():
57
{% elif page.is_moc and page.designer_id == comment.user_id %}
58
<span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
SELECT COUNT(*) AS "__count" FROM "accounts_usertrophy" WHERE "accounts_usertrophy"."user_id" = 590284SELECT ••• FROM "accounts_usertrophy" WHERE "accounts_usertrophy"."user_id" = 590284
2 similar queries.
Duplicated 2 times.
0.09
Connection: default
Transaction status: Idle
/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
return fn(*args, **kw)/home/nathan/rb/site/./accounts/views/profile.py in user_profile(358)
return render(request, 'accounts/user_profile.html', context)