Skip to content

Instantly share code, notes, and snippets.

@junaid-malik-confiz
Created May 4, 2017 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junaid-malik-confiz/29c705b7782e8302adc3119e039a9e65 to your computer and use it in GitHub Desktop.
Save junaid-malik-confiz/29c705b7782e8302adc3119e039a9e65 to your computer and use it in GitHub Desktop.
LOG: duration: 138.396 ms execute <unnamed>: SELECT "topic_custom_fields".* FROM "topic_custom_fields" WHERE "topic_custom_fields"."name" = 'import_id' AND "topic_custom_fields"."value" = '171368' ORDER BY "topic_custom_fields"."id" ASC LIMIT 1
LOG: duration: 10.007 ms execute <unnamed>: SELECT 1 AS one FROM "email_logs" WHERE "email_logs"."post_id" = 5600348 AND "email_logs"."user_id" = 740596 AND "email_logs"."skipped" = 'f' LIMIT 1
LOG: duration: 829.019 ms execute <unnamed>: SELECT COUNT(*) AS count_all, topic_tags.tag_id, tags.name AS topic_tags_tag_id_tags_name FROM "topic_tags" INNER JOIN "tags" ON "tags"."id" = "topic_tags"."tag_id" INNER JOIN "topics" ON "topics"."id" = "topic_tags"."topic_id" AND ("topics"."deleted_at" IS NULL) GROUP BY topic_tags.tag_id, tags.name ORDER BY count_all DESC LIMIT 30
LOG: duration: 16.837 ms execute <unnamed>: SELECT COUNT(*) FROM "posts" WHERE ("posts"."deleted_at" IS NULL) AND (posts.post_type in (1,2,3)) AND (post_number > COALESCE((
SELECT last_read_post_number FROM topic_users tu
WHERE tu.user_id = 272438 AND tu.topic_id = 156687 ),0)) AND (reply_to_user_id = 272438 OR exists(
SELECT 1 from topic_users tu
WHERE tu.user_id = 272438 AND
tu.topic_id = 156687 AND
notification_level = 3
)) AND "posts"."topic_id" = 156687
LOG: duration: 254.591 ms execute <unnamed>: SELECT COUNT(*) FROM "post_actions" WHERE "post_actions"."post_action_type_id" = 2
LOG: duration: 66.314 ms execute <unnamed>: SELECT "topics"."id" FROM "topics" LEFT OUTER JOIN "categories" ON "categories"."id" = "topics"."category_id" LEFT OUTER JOIN topic_users AS tu ON (topics.id = tu.topic_id AND tu.user_id = -1) WHERE (categories.id = 54 OR (categories.parent_category_id = 54 AND categories.topic_id <> topics.id)) AND (topics.archetype <> 'private_message') AND (COALESCE(categories.topic_id, 0) <> topics.id) AND "topics"."visible" = 't' AND ("topics"."id" != 60) AND (topics.deleted_at IS NULL) AND (COALESCE(tu.notification_level,1) > 0) AND (
NOT EXISTS (
SELECT 1
FROM category_users cu
WHERE cu.user_id = -1
AND cu.category_id = topics.category_id
AND cu.notification_level = 0
AND cu.category_id <> 54
AND (tu.notification_level IS NULL OR tu.notification_level < 2)
)) AND "topics"."closed" = 'f' AND "topics"."archived" = 'f' AND (topics.created_at > '2016-05-04 14:48:13.163378') ORDER BY RANDOM() LIMIT 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment