Skip to content

Instantly share code, notes, and snippets.

@eeshangarg
Created May 5, 2018 19:58
Show Gist options
  • Save eeshangarg/2dd5edeb4378a23c6921a0240aced768 to your computer and use it in GitHub Desktop.
Save eeshangarg/2dd5edeb4378a23c6921a0240aced768 to your computer and use it in GitHub Desktop.
The diff depicting the one extra SQL query after my changes/refactor (zerver.tests.test_subs.SubscriptionAPITest.test_multi_user_subscription)
--- test_without_changes.json 2018-05-05 17:11:07.234475225 -0230
+++ test_with_changes.json 2018-05-05 17:08:37.606523263 -0230
@@ -4,11 +4,11 @@
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_userprofile\" INNER JOIN \"zerver_realm\" ON (\"zerver_userprofile\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (UPPER(\"zerver_userprofile\".\"email\"::text) = UPPER('hamlet@zulip.com') AND \"zerver_userprofile\".\"realm_id\" = 1)",
+ "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_userprofile\" INNER JOIN \"zerver_realm\" ON (\"zerver_userprofile\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (\"zerver_userprofile\".\"realm_id\" = 1 AND UPPER(\"zerver_userprofile\".\"email\"::text) = UPPER('hamlet@zulip.com'))",
"time": "0.001"
},
{
- "sql": "SELECT \"django_session\".\"session_key\", \"django_session\".\"session_data\", \"django_session\".\"expire_date\" FROM \"django_session\" WHERE (\"django_session\".\"expire_date\" > '2018-05-05T19:39:37.486459+00:00'::timestamptz AND \"django_session\".\"session_key\" = 'qoxwqirxy5d50ccjyni47fz9nchnsk36')",
+ "sql": "SELECT \"django_session\".\"session_key\", \"django_session\".\"session_data\", \"django_session\".\"expire_date\" FROM \"django_session\" WHERE (\"django_session\".\"session_key\" = 'tpl5epo8wlkbvxjy9wl43ygv1i20bipv' AND \"django_session\".\"expire_date\" > '2018-05-05T19:37:36.441985+00:00'::timestamptz)",
"time": "0.000"
},
{
@@ -24,7 +24,7 @@
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_stream\" INNER JOIN \"zerver_realm\" ON (\"zerver_stream\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (\"zerver_stream\".\"deactivated\" = false AND \"zerver_stream\".\"realm_id\" = 1 AND (UPPER(zerver_stream.name::text) IN (UPPER('multi_user_stream'))))",
+ "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_stream\" INNER JOIN \"zerver_realm\" ON (\"zerver_stream\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (\"zerver_stream\".\"realm_id\" = 1 AND \"zerver_stream\".\"deactivated\" = false AND (UPPER(zerver_stream.name::text) IN (UPPER('multi_user_stream'))))",
"time": "0.001"
},
{
@@ -32,7 +32,7 @@
"time": "0.000"
},
{
- "sql": "INSERT INTO \"zerver_stream\" (\"name\", \"realm_id\", \"invite_only\", \"history_public_to_subscribers\", \"is_web_public\", \"is_in_zephyr_realm\", \"email_token\", \"description\", \"date_created\", \"deactivated\") VALUES ('multi_user_stream', 1, false, true, false, false, 'af9f9cc8847005bd34b61d7817a61d8d', '', '2018-05-05T19:39:37.496870+00:00'::timestamptz, false) RETURNING \"zerver_stream\".\"id\"",
+ "sql": "INSERT INTO \"zerver_stream\" (\"name\", \"realm_id\", \"invite_only\", \"history_public_to_subscribers\", \"is_web_public\", \"is_in_zephyr_realm\", \"email_token\", \"description\", \"date_created\", \"deactivated\") VALUES ('multi_user_stream', 1, false, true, false, false, 'ac4e1df97a25302499b44c9bea40077d', '', '2018-05-05T19:37:36.452466+00:00'::timestamptz, false) RETURNING \"zerver_stream\".\"id\"",
"time": "0.000"
},
{
@@ -40,27 +40,27 @@
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_userprofile\".\"id\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"realm_id\" = 1 AND \"zerver_userprofile\".\"is_active\" = true)",
+ "sql": "SELECT \"zerver_userprofile\".\"id\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"is_active\" = true AND \"zerver_userprofile\".\"realm_id\" = 1)",
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_userprofile\" INNER JOIN \"zerver_realm\" ON (\"zerver_userprofile\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (UPPER(\"zerver_userprofile\".\"email\"::text) = UPPER('cordelia@zulip.com') AND \"zerver_userprofile\".\"realm_id\" = 1)",
+ "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_userprofile\" INNER JOIN \"zerver_realm\" ON (\"zerver_userprofile\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (\"zerver_userprofile\".\"realm_id\" = 1 AND UPPER(\"zerver_userprofile\".\"email\"::text) = UPPER('cordelia@zulip.com'))",
"time": "0.001"
},
{
- "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_userprofile\" INNER JOIN \"zerver_realm\" ON (\"zerver_userprofile\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (UPPER(\"zerver_userprofile\".\"email\"::text) = UPPER('iago@zulip.com') AND \"zerver_userprofile\".\"realm_id\" = 1)",
+ "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_userprofile\" INNER JOIN \"zerver_realm\" ON (\"zerver_userprofile\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (\"zerver_userprofile\".\"realm_id\" = 1 AND UPPER(\"zerver_userprofile\".\"email\"::text) = UPPER('iago@zulip.com'))",
"time": "0.001"
},
{
- "sql": "SELECT \"zerver_recipient\".\"id\", \"zerver_recipient\".\"type_id\", \"zerver_recipient\".\"type\" FROM \"zerver_recipient\" WHERE (\"zerver_recipient\".\"type_id\" IN (6) AND \"zerver_recipient\".\"type\" = 2)",
+ "sql": "SELECT \"zerver_recipient\".\"id\", \"zerver_recipient\".\"type_id\", \"zerver_recipient\".\"type\" FROM \"zerver_recipient\" WHERE (\"zerver_recipient\".\"type\" = 2 AND \"zerver_recipient\".\"type_id\" IN (6))",
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_subscription\".\"id\", \"zerver_subscription\".\"user_profile_id\", \"zerver_subscription\".\"recipient_id\", \"zerver_subscription\".\"active\", \"zerver_subscription\".\"in_home_view\", \"zerver_subscription\".\"color\", \"zerver_subscription\".\"pin_to_top\", \"zerver_subscription\".\"desktop_notifications\", \"zerver_subscription\".\"audible_notifications\", \"zerver_subscription\".\"push_notifications\", \"zerver_subscription\".\"email_notifications\", \"zerver_subscription\".\"notifications\", \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\" FROM \"zerver_subscription\" INNER JOIN \"zerver_userprofile\" ON (\"zerver_subscription\".\"user_profile_id\" = \"zerver_userprofile\".\"id\") INNER JOIN \"zerver_recipient\" ON (\"zerver_subscription\".\"recipient_id\" = \"zerver_recipient\".\"id\") WHERE (\"zerver_subscription\".\"user_profile_id\" IN (3, 5) AND \"zerver_recipient\".\"type\" = 2)",
+ "sql": "SELECT \"zerver_subscription\".\"id\", \"zerver_subscription\".\"user_profile_id\", \"zerver_subscription\".\"recipient_id\", \"zerver_subscription\".\"active\", \"zerver_subscription\".\"in_home_view\", \"zerver_subscription\".\"color\", \"zerver_subscription\".\"pin_to_top\", \"zerver_subscription\".\"desktop_notifications\", \"zerver_subscription\".\"audible_notifications\", \"zerver_subscription\".\"push_notifications\", \"zerver_subscription\".\"email_notifications\", \"zerver_subscription\".\"notifications\", \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"password\", \"zerver_userprofile\".\"last_login\", \"zerver_userprofile\".\"is_superuser\", \"zerver_userprofile\".\"email\", \"zerver_userprofile\".\"is_staff\", \"zerver_userprofile\".\"is_active\", \"zerver_userprofile\".\"is_realm_admin\", \"zerver_userprofile\".\"is_bot\", \"zerver_userprofile\".\"is_guest\", \"zerver_userprofile\".\"bot_type\", \"zerver_userprofile\".\"is_api_super_user\", \"zerver_userprofile\".\"date_joined\", \"zerver_userprofile\".\"is_mirror_dummy\", \"zerver_userprofile\".\"bot_owner_id\", \"zerver_userprofile\".\"long_term_idle\", \"zerver_userprofile\".\"full_name\", \"zerver_userprofile\".\"short_name\", \"zerver_userprofile\".\"pointer\", \"zerver_userprofile\".\"last_pointer_updater\", \"zerver_userprofile\".\"realm_id\", \"zerver_userprofile\".\"api_key\", \"zerver_userprofile\".\"tos_version\", \"zerver_userprofile\".\"last_active_message_id\", \"zerver_userprofile\".\"enable_stream_desktop_notifications\", \"zerver_userprofile\".\"enable_stream_email_notifications\", \"zerver_userprofile\".\"enable_stream_push_notifications\", \"zerver_userprofile\".\"enable_stream_sounds\", \"zerver_userprofile\".\"enable_desktop_notifications\", \"zerver_userprofile\".\"pm_content_in_desktop_notifications\", \"zerver_userprofile\".\"enable_sounds\", \"zerver_userprofile\".\"enable_offline_email_notifications\", \"zerver_userprofile\".\"message_content_in_email_notifications\", \"zerver_userprofile\".\"enable_offline_push_notifications\", \"zerver_userprofile\".\"enable_online_push_notifications\", \"zerver_userprofile\".\"enable_digest_emails\", \"zerver_userprofile\".\"realm_name_in_notifications\", \"zerver_userprofile\".\"last_reminder\", \"zerver_userprofile\".\"rate_limits\", \"zerver_userprofile\".\"default_sending_stream_id\", \"zerver_userprofile\".\"default_events_register_stream_id\", \"zerver_userprofile\".\"default_all_public_streams\", \"zerver_userprofile\".\"enter_sends\", \"zerver_userprofile\".\"left_side_userlist\", \"zerver_userprofile\".\"twenty_four_hour_time\", \"zerver_userprofile\".\"default_language\", \"zerver_userprofile\".\"high_contrast_mode\", \"zerver_userprofile\".\"night_mode\", \"zerver_userprofile\".\"translate_emoticons\", \"zerver_userprofile\".\"avatar_source\", \"zerver_userprofile\".\"avatar_version\", \"zerver_userprofile\".\"tutorial_status\", \"zerver_userprofile\".\"onboarding_steps\", \"zerver_userprofile\".\"alert_words\", \"zerver_userprofile\".\"timezone\", \"zerver_userprofile\".\"emojiset\" FROM \"zerver_subscription\" INNER JOIN \"zerver_recipient\" ON (\"zerver_subscription\".\"recipient_id\" = \"zerver_recipient\".\"id\") INNER JOIN \"zerver_userprofile\" ON (\"zerver_subscription\".\"user_profile_id\" = \"zerver_userprofile\".\"id\") WHERE (\"zerver_recipient\".\"type\" = 2 AND \"zerver_subscription\".\"user_profile_id\" IN (3, 5))",
"time": "0.001"
},
{
- "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\" FROM \"zerver_stream\" WHERE (\"zerver_stream\".\"id\" IN (SELECT V0.\"type_id\" AS Col1 FROM \"zerver_recipient\" V0 WHERE (V0.\"id\" IN (SELECT U0.\"recipient_id\" AS Col1 FROM \"zerver_subscription\" U0 INNER JOIN \"zerver_userprofile\" U1 ON (U0.\"user_profile_id\" = U1.\"id\") WHERE (U1.\"realm_id\" = 1 AND U1.\"is_active\" = true AND U0.\"active\" = true)) AND V0.\"type\" = 2)) AND \"zerver_stream\".\"deactivated\" = false AND \"zerver_stream\".\"realm_id\" = 1)",
+ "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\" FROM \"zerver_stream\" WHERE (\"zerver_stream\".\"id\" IN (SELECT V0.\"type_id\" AS Col1 FROM \"zerver_recipient\" V0 WHERE (V0.\"id\" IN (SELECT U0.\"recipient_id\" AS Col1 FROM \"zerver_subscription\" U0 INNER JOIN \"zerver_userprofile\" U1 ON (U0.\"user_profile_id\" = U1.\"id\") WHERE (U0.\"active\" = true AND U1.\"is_active\" = true AND U1.\"realm_id\" = 1)) AND V0.\"type\" = 2)) AND \"zerver_stream\".\"realm_id\" = 1 AND \"zerver_stream\".\"deactivated\" = false)",
"time": "0.001"
},
{
@@ -68,7 +68,7 @@
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\" FROM \"zerver_stream\" WHERE (\"zerver_stream\".\"id\" IN (SELECT V0.\"type_id\" AS Col1 FROM \"zerver_recipient\" V0 WHERE (V0.\"id\" IN (SELECT U0.\"recipient_id\" AS Col1 FROM \"zerver_subscription\" U0 INNER JOIN \"zerver_userprofile\" U1 ON (U0.\"user_profile_id\" = U1.\"id\") WHERE (U1.\"realm_id\" = 1 AND U1.\"is_active\" = true AND U0.\"active\" = true)) AND V0.\"type\" = 2)) AND \"zerver_stream\".\"deactivated\" = false AND \"zerver_stream\".\"realm_id\" = 1)",
+ "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\" FROM \"zerver_stream\" WHERE (\"zerver_stream\".\"id\" IN (SELECT V0.\"type_id\" AS Col1 FROM \"zerver_recipient\" V0 WHERE (V0.\"id\" IN (SELECT U0.\"recipient_id\" AS Col1 FROM \"zerver_subscription\" U0 INNER JOIN \"zerver_userprofile\" U1 ON (U0.\"user_profile_id\" = U1.\"id\") WHERE (U0.\"active\" = true AND U1.\"is_active\" = true AND U1.\"realm_id\" = 1)) AND V0.\"type\" = 2)) AND \"zerver_stream\".\"realm_id\" = 1 AND \"zerver_stream\".\"deactivated\" = false)",
"time": "0.001"
},
{
@@ -76,23 +76,23 @@
"time": "0.015"
},
{
- "sql": "INSERT INTO \"zerver_realmauditlog\" (\"realm_id\", \"acting_user_id\", \"modified_user_id\", \"modified_stream_id\", \"event_last_message_id\", \"event_type\", \"event_time\", \"backfilled\", \"extra_data\") VALUES (1, 4, 3, 6, 30, 'subscription_created', '2018-05-05T19:39:37.514886+00:00'::timestamptz, false, NULL), (1, 4, 5, 6, 30, 'subscription_created', '2018-05-05T19:39:37.514886+00:00'::timestamptz, false, NULL) RETURNING \"zerver_realmauditlog\".\"id\"",
+ "sql": "INSERT INTO \"zerver_realmauditlog\" (\"realm_id\", \"acting_user_id\", \"modified_user_id\", \"modified_stream_id\", \"event_last_message_id\", \"event_type\", \"event_time\", \"backfilled\", \"extra_data\") VALUES (1, 4, 3, 6, 30, 'subscription_created', '2018-05-05T19:37:36.470359+00:00'::timestamptz, false, NULL), (1, 4, 5, 6, 30, 'subscription_created', '2018-05-05T19:37:36.470359+00:00'::timestamptz, false, NULL) RETURNING \"zerver_realmauditlog\".\"id\"",
"time": "0.001"
},
{
- "sql": "SELECT \"zerver_userprofile\".\"id\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"realm_id\" = 1 AND \"zerver_userprofile\".\"is_active\" = true)",
+ "sql": "SELECT \"zerver_userprofile\".\"id\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"is_active\" = true AND \"zerver_userprofile\".\"realm_id\" = 1)",
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_recipient\".\"type_id\", \"zerver_subscription\".\"user_profile_id\" FROM \"zerver_subscription\" INNER JOIN \"zerver_recipient\" ON (\"zerver_subscription\".\"recipient_id\" = \"zerver_recipient\".\"id\") INNER JOIN \"zerver_userprofile\" ON (\"zerver_subscription\".\"user_profile_id\" = \"zerver_userprofile\".\"id\") WHERE (\"zerver_recipient\".\"type_id\" IN (6) AND \"zerver_recipient\".\"type\" = 2 AND \"zerver_subscription\".\"active\" = true AND \"zerver_userprofile\".\"is_active\" = true) ORDER BY \"zerver_recipient\".\"type_id\" ASC",
- "time": "0.001"
+ "sql": "SELECT \"zerver_recipient\".\"type_id\", \"zerver_subscription\".\"user_profile_id\" FROM \"zerver_subscription\" INNER JOIN \"zerver_recipient\" ON (\"zerver_subscription\".\"recipient_id\" = \"zerver_recipient\".\"id\") INNER JOIN \"zerver_userprofile\" ON (\"zerver_subscription\".\"user_profile_id\" = \"zerver_userprofile\".\"id\") WHERE (\"zerver_subscription\".\"active\" = true AND \"zerver_recipient\".\"type_id\" IN (6) AND \"zerver_recipient\".\"type\" = 2 AND \"zerver_userprofile\".\"is_active\" = true) ORDER BY \"zerver_recipient\".\"type_id\" ASC",
+ "time": "0.000"
},
{
- "sql": "SELECT \"analytics_streamcount\".\"stream_id\", SUM(\"analytics_streamcount\".\"value\") AS \"value\" FROM \"analytics_streamcount\" WHERE (\"analytics_streamcount\".\"end_time\" > '2018-04-07T19:39:37.534837+00:00'::timestamptz AND \"analytics_streamcount\".\"property\" = 'messages_in_stream:is_bot:day' AND \"analytics_streamcount\".\"stream_id\" IN (6)) GROUP BY \"analytics_streamcount\".\"stream_id\"",
+ "sql": "SELECT \"analytics_streamcount\".\"stream_id\", SUM(\"analytics_streamcount\".\"value\") AS \"value\" FROM \"analytics_streamcount\" WHERE (\"analytics_streamcount\".\"property\" = 'messages_in_stream:is_bot:day' AND \"analytics_streamcount\".\"end_time\" > '2018-04-07T19:37:36.490119+00:00'::timestamptz AND \"analytics_streamcount\".\"stream_id\" IN (6)) GROUP BY \"analytics_streamcount\".\"stream_id\"",
"time": "0.001"
},
{
- "sql": "SELECT \"zerver_userprofile\".\"id\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"realm_id\" = 1 AND \"zerver_userprofile\".\"is_active\" = true)",
+ "sql": "SELECT \"zerver_userprofile\".\"id\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"is_active\" = true AND \"zerver_userprofile\".\"realm_id\" = 1)",
"time": "0.000"
},
{
@@ -112,19 +112,23 @@
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_stream\" INNER JOIN \"zerver_realm\" ON (\"zerver_stream\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (\"zerver_stream\".\"realm_id\" = 1 AND UPPER(\"zerver_stream\".\"name\"::text) = UPPER('multi_user_stream'))",
+ "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\", \"zerver_stream\".\"realm_id\", \"zerver_stream\".\"invite_only\", \"zerver_stream\".\"history_public_to_subscribers\", \"zerver_stream\".\"is_web_public\", \"zerver_stream\".\"is_in_zephyr_realm\", \"zerver_stream\".\"email_token\", \"zerver_stream\".\"description\", \"zerver_stream\".\"date_created\", \"zerver_stream\".\"deactivated\", \"zerver_realm\".\"id\", \"zerver_realm\".\"name\", \"zerver_realm\".\"string_id\", \"zerver_realm\".\"restricted_to_domain\", \"zerver_realm\".\"invite_required\", \"zerver_realm\".\"invite_by_admins_only\", \"zerver_realm\".\"inline_image_preview\", \"zerver_realm\".\"inline_url_embed_preview\", \"zerver_realm\".\"create_stream_by_admins_only\", \"zerver_realm\".\"add_emoji_by_admins_only\", \"zerver_realm\".\"mandatory_topics\", \"zerver_realm\".\"show_digest_email\", \"zerver_realm\".\"name_changes_disabled\", \"zerver_realm\".\"email_changes_disabled\", \"zerver_realm\".\"disallow_disposable_email_addresses\", \"zerver_realm\".\"description\", \"zerver_realm\".\"send_welcome_emails\", \"zerver_realm\".\"allow_message_deleting\", \"zerver_realm\".\"message_content_delete_limit_seconds\", \"zerver_realm\".\"allow_message_editing\", \"zerver_realm\".\"message_content_edit_limit_seconds\", \"zerver_realm\".\"message_retention_days\", \"zerver_realm\".\"allow_edit_history\", \"zerver_realm\".\"allow_community_topic_editing\", \"zerver_realm\".\"default_twenty_four_hour_time\", \"zerver_realm\".\"org_type\", \"zerver_realm\".\"bot_creation_policy\", \"zerver_realm\".\"date_created\", \"zerver_realm\".\"notifications_stream_id\", \"zerver_realm\".\"signup_notifications_stream_id\", \"zerver_realm\".\"deactivated\", \"zerver_realm\".\"default_language\", \"zerver_realm\".\"authentication_methods\", \"zerver_realm\".\"waiting_period_threshold\", \"zerver_realm\".\"max_invites\", \"zerver_realm\".\"message_visibility_limit\", \"zerver_realm\".\"upload_quota_gb\", \"zerver_realm\".\"video_chat_provider\", \"zerver_realm\".\"google_hangouts_domain\", \"zerver_realm\".\"icon_source\", \"zerver_realm\".\"icon_version\" FROM \"zerver_stream\" INNER JOIN \"zerver_realm\" ON (\"zerver_stream\".\"realm_id\" = \"zerver_realm\".\"id\") WHERE (UPPER(\"zerver_stream\".\"name\"::text) = UPPER('multi_user_stream') AND \"zerver_stream\".\"realm_id\" = 1)",
"time": "0.000"
},
{
+ "sql": "SELECT COUNT(*) AS \"__count\" FROM \"zerver_subscription\" INNER JOIN \"zerver_recipient\" ON (\"zerver_subscription\".\"recipient_id\" = \"zerver_recipient\".\"id\") INNER JOIN \"zerver_userprofile\" ON (\"zerver_subscription\".\"user_profile_id\" = \"zerver_userprofile\".\"id\") WHERE (\"zerver_subscription\".\"active\" = true AND \"zerver_recipient\".\"type\" = 2 AND \"zerver_recipient\".\"type_id\" = 6 AND \"zerver_userprofile\".\"is_active\" = true)",
+ "time": "0.001"
+ },
+ {
"sql": "SELECT \"zerver_recipient\".\"id\", \"zerver_recipient\".\"type_id\", \"zerver_recipient\".\"type\" FROM \"zerver_recipient\" WHERE (\"zerver_recipient\".\"type_id\" = 6 AND \"zerver_recipient\".\"type\" = 2)",
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_subscription\".\"user_profile_id\", \"zerver_subscription\".\"push_notifications\", \"zerver_subscription\".\"in_home_view\" FROM \"zerver_subscription\" INNER JOIN \"zerver_recipient\" ON (\"zerver_subscription\".\"recipient_id\" = \"zerver_recipient\".\"id\") WHERE (\"zerver_recipient\".\"type\" = 2 AND \"zerver_recipient\".\"type_id\" = 6 AND \"zerver_subscription\".\"active\" = true) ORDER BY \"zerver_subscription\".\"user_profile_id\" ASC",
+ "sql": "SELECT \"zerver_subscription\".\"user_profile_id\", \"zerver_subscription\".\"push_notifications\", \"zerver_subscription\".\"in_home_view\" FROM \"zerver_subscription\" INNER JOIN \"zerver_recipient\" ON (\"zerver_subscription\".\"recipient_id\" = \"zerver_recipient\".\"id\") WHERE (\"zerver_subscription\".\"active\" = true AND \"zerver_recipient\".\"type\" = 2 AND \"zerver_recipient\".\"type_id\" = 6) ORDER BY \"zerver_subscription\".\"user_profile_id\" ASC",
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_mutedtopic\".\"user_profile_id\" FROM \"zerver_mutedtopic\" WHERE (\"zerver_mutedtopic\".\"stream_id\" = 6 AND UPPER(\"zerver_mutedtopic\".\"topic_name\"::text) = UPPER('hello'))",
+ "sql": "SELECT \"zerver_mutedtopic\".\"user_profile_id\" FROM \"zerver_mutedtopic\" WHERE (UPPER(\"zerver_mutedtopic\".\"topic_name\"::text) = UPPER('hello') AND \"zerver_mutedtopic\".\"stream_id\" = 6)",
"time": "0.000"
},
{
@@ -132,7 +136,7 @@
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"alert_words\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"is_active\" = true AND \"zerver_userprofile\".\"realm_id\" = 1 AND NOT (\"zerver_userprofile\".\"alert_words\" = '[]'))",
+ "sql": "SELECT \"zerver_userprofile\".\"id\", \"zerver_userprofile\".\"alert_words\" FROM \"zerver_userprofile\" WHERE (\"zerver_userprofile\".\"realm_id\" = 1 AND \"zerver_userprofile\".\"is_active\" = true AND NOT (\"zerver_userprofile\".\"alert_words\" = '[]'))",
"time": "0.000"
},
{
@@ -144,11 +148,11 @@
"time": "0.000"
},
{
- "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\" FROM \"zerver_stream\" WHERE (\"zerver_stream\".\"deactivated\" = false AND \"zerver_stream\".\"realm_id\" = 1 AND \"zerver_stream\".\"name\" = 'multi_user_stream')",
+ "sql": "SELECT \"zerver_stream\".\"id\", \"zerver_stream\".\"name\" FROM \"zerver_stream\" WHERE (\"zerver_stream\".\"realm_id\" = 1 AND \"zerver_stream\".\"deactivated\" = false AND \"zerver_stream\".\"name\" = 'multi_user_stream')",
"time": "0.000"
},
{
- "sql": "INSERT INTO \"zerver_message\" (\"sender_id\", \"recipient_id\", \"subject\", \"content\", \"rendered_content\", \"rendered_content_version\", \"pub_date\", \"sending_client_id\", \"last_edit_time\", \"edit_history\", \"has_attachment\", \"has_image\", \"has_link\") VALUES (16, 30, 'hello', 'Welcome to #**multi_user_stream**.', '<p>Welcome to <a class=\"stream\" data-stream-id=\"6\" href=\"/#narrow/stream/6-multi_user_stream\">#multi_user_stream</a>.</p>', 1, '2018-05-05T19:39:37.545258+00:00'::timestamptz, 5, NULL, NULL, false, false, false) RETURNING \"zerver_message\".\"id\"",
+ "sql": "INSERT INTO \"zerver_message\" (\"sender_id\", \"recipient_id\", \"subject\", \"content\", \"rendered_content\", \"rendered_content_version\", \"pub_date\", \"sending_client_id\", \"last_edit_time\", \"edit_history\", \"has_attachment\", \"has_image\", \"has_link\") VALUES (16, 30, 'hello', 'Welcome to #**multi_user_stream**.', '<p>Welcome to <a class=\"stream\" data-stream-id=\"6\" href=\"/#narrow/stream/6-multi_user_stream\">#multi_user_stream</a>.</p>', 1, '2018-05-05T19:37:36.501858+00:00'::timestamptz, 5, NULL, NULL, false, false, false) RETURNING \"zerver_message\".\"id\"",
"time": "0.002"
},
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment