Created
August 15, 2011 15:34
-
-
Save yohanboniface/1147014 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Rubriques papier : | |
2011-08-15 17:23:31 CEST LOG: duration: 9284.827 ms statement: | |
SELECT "libe_contentmodel".* FROM "libe_contentmodel" | |
INNER JOIN "libe_contenttosection" ON ("libe_contentmodel"."id" = "libe_contenttosection"."content_model_id") | |
WHERE ("libe_contenttosection"."section_id" = 69 AND "libe_contentmodel"."workflow_state" = 20 ) | |
ORDER BY "libe_contentmodel"."computed_ponderation" DESC, "libe_contentmodel"."updating_date" DESC LIMIT 4 | |
** pour savoir si un objet fait partie d'un dossier | |
2011-08-15 17:23:32 CEST LOG: duration: 1136.757 ms statement: | |
SELECT "libe_section".* FROM "libe_section" | |
INNER JOIN "libe_contenttosection" ON ("libe_section"."id" = "libe_contenttosection"."section_id") | |
WHERE ("libe_contenttosection"."content_model_id" = 744661 | |
AND "libe_section"."is_folder" = true | |
AND "libe_section"."workflow_state" = 20 ) | |
ORDER BY "libe_section"."id" ASC LIMIT 1 | |
** distinct + not in pour ? => a killer | |
2011-08-15 17:23:36 CEST LOG: duration: 3745.083 ms statement: | |
SELECT DISTINCT "libe_contentmodel".* FROM "libe_contentmodel" | |
INNER JOIN "libe_contenttosection" ON ("libe_contentmodel"."id" = "libe_contenttosection"."content_model_id") | |
WHERE ("libe_contentmodel"."workflow_state" = 20 | |
AND "libe_contentmodel"."access" = 0 | |
AND "libe_contenttosection"."section_id" IN (58) | |
AND NOT ("libe_contentmodel"."id" IN (755064, 754836, 754622, 754578, 754534))) | |
ORDER BY "libe_contentmodel"."computed_ponderation" DESC, "libe_contentmodel"."updating_date" DESC LIMIT 3 | |
** Rubrique papier bis | |
2011-08-15 17:23:36 CEST LOG: duration: 7704.057 ms statement: | |
SELECT "libe_contentmodel".* FROM "libe_contentmodel" | |
INNER JOIN "libe_contenttosection" ON ("libe_contentmodel"."id" = "libe_contenttosection"."content_model_id") | |
WHERE ("libe_contenttosection"."section_id" = 69 AND "libe_contentmodel"."workflow_state" = 20 ) | |
ORDER BY "libe_contentmodel"."computed_ponderation" DESC, "libe_contentmodel"."updating_date" DESC LIMIT 4 | |
** distinct (bis) | |
2011-08-15 17:23:38 CEST LOG: duration: 1576.021 ms statement: SELECT DISTINCT "libe_contentmodel".* FROM "libe_contentmodel" | |
INNER JOIN "libe_contenttosection" ON ("libe_contentmodel"."id" = "libe_contenttosection"."content_model_id") | |
WHERE ("libe_contentmodel"."workflow_state" = 20 AND "libe_contentmodel"."access" = 0 AND "libe_contenttosection"."section_id" IN (59) | |
AND NOT ("libe_contentmodel"."id" IN (755064, 754836, 754622, 754578, 754534, 755080, 754543, 754132))) | |
ORDER BY "libe_contentmodel"."computed_ponderation" DESC, "libe_contentmodel"."updating_date" DESC LIMIT 3 | |
** GET modération conciléo | |
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", "mptt_comments_mpttcomment"."comment_ptr_id", "mptt_comments_mpttcomment"."title", | |
"mptt_comments_mpttcomment"."parent_id", "mptt_comments_mpttcomment"."lft", "mptt_comments_mpttcomment"."rght", | |
"mptt_comments_mpttcomment"."tree_id", "mptt_comments_mpttcomment"."level", "auth_user"."id", "auth_user"."username", | |
"auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", | |
"auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined" | |
FROM "mptt_comments_mpttcomment" | |
INNER JOIN "django_comments" ON ("mptt_comments_mpttcomment"."comment_ptr_id" = "django_comments"."id") | |
LEFT OUTER JOIN "auth_user" ON ("django_comments"."user_id" = "auth_user"."id") | |
WHERE ("django_comments"."submit_date" >= 2011-06-16 21:05:07 | |
AND "django_comments"."submit_date" < 2011-08-15 21:05:07 AND NOT (("mptt_comments_mpttcomment"."comment_ptr_id" | |
IN (SELECT U2."comment_id" | |
FROM "django_comment_flags" U2 WHERE (U2."flag" = ext-mod-ok AND U2."comment_id" IS NOT NULL)) AND | |
"mptt_comments_mpttcomment"."comment_ptr_id" IS NOT NULL))) ORDER BY "django_comments"."submit_date" ASC LIMIT 500 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment