43.89 ms (55.33%)
|
1 |
SELECT phc.post_id, phc.category_id, c.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_category phc INNER JOIN category c ON phc.category_id = c.category_id AND c.enabled = 1 LEFT JOIN category_translation f ON c.category_id = f.category_id AND f.lang_id=? LEFT JOIN category_translation r ON `c`.`category_id` = `r`.`category_id` AND `r`.`lang_id`=? WHERE phc.post_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1
2
386016
476109
482605
518493
532913
533007
541781
600968
631170
640534
641148
642064
664212
706939
708462
732316
742804
756472
770881
770912
778366
790359
805484
808059
810824
816882
817877
818165
819151
825831
]
SELECT phc.post_id, phc.category_id, c.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_category phc INNER JOIN category c ON phc.category_id = c.category_id AND c.enabled = 1 LEFT JOIN category_translation f ON c.category_id = f.category_id AND f.lang_id=1 LEFT JOIN category_translation r ON `c`.`category_id` = `r`.`category_id` AND `r`.`lang_id`=2 WHERE phc.post_id IN (386016, 476109, 482605, 518493, 532913, 533007, 541781, 600968, 631170, 640534, 641148, 642064, 664212, 706939, 708462, 732316, 742804, 756472, 770881, 770912, 778366, 790359, 805484, 808059, 810824, 816882, 817877, 818165, 819151, 825831);
|
4.75 ms (5.98%)
|
1 |
SELECT p.post_id, p.user_id, p.content_id, p.public_key, p.search_field, p.cover, p.type, p.sexual_orientation, p.orientation, p.quality, p.noindex, p.nofollow, p.contents_num, p.duration, p.likes, p.dislikes, p.views, p.vote_rating, p.params, p.published_at, IFNULL(`r`.`title`, `f`.`title`) as `title`, IFNULL(`r`.`custom1`, `f`.`custom1`) as `custom1`, IFNULL(`r`.`custom2`, `f`.`custom2`) as `custom2` FROM post p LEFT JOIN post_translation f ON `p`.`post_id` = `f`.`post_id` AND `f`.`lang_id`=? LEFT JOIN post_translation r ON `p`.`post_id` = `r`.`post_id` AND `r`.`lang_id`=? WHERE p.post_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1
2
641148
706939
818165
664212
541781
808059
482605
642064
817877
756472
810824
742804
708462
816882
631170
640534
532913
386016
518493
778366
770912
533007
825831
790359
600968
770881
476109
732316
819151
805484
]
SELECT
p.post_id,
p.user_id,
p.content_id,
p.public_key,
p.search_field,
p.cover,
p.type,
p.sexual_orientation,
p.orientation,
p.quality,
p.noindex,
p.nofollow,
p.contents_num,
p.duration,
p.likes,
p.dislikes,
p.views,
p.vote_rating,
p.params,
p.published_at,
IFNULL(`r`.`title`, `f`.`title`) as `title`,
IFNULL(`r`.`custom1`, `f`.`custom1`) as `custom1`,
IFNULL(`r`.`custom2`, `f`.`custom2`) as `custom2`
FROM
post p
LEFT JOIN post_translation f ON `p`.`post_id` = `f`.`post_id`
AND `f`.`lang_id` = ?
LEFT JOIN post_translation r ON `p`.`post_id` = `r`.`post_id`
AND `r`.`lang_id` = ?
WHERE
p.post_id IN (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
SELECT p.post_id, p.user_id, p.content_id, p.public_key, p.search_field, p.cover, p.type, p.sexual_orientation, p.orientation, p.quality, p.noindex, p.nofollow, p.contents_num, p.duration, p.likes, p.dislikes, p.views, p.vote_rating, p.params, p.published_at, IFNULL(`r`.`title`, `f`.`title`) as `title`, IFNULL(`r`.`custom1`, `f`.`custom1`) as `custom1`, IFNULL(`r`.`custom2`, `f`.`custom2`) as `custom2` FROM post p LEFT JOIN post_translation f ON `p`.`post_id` = `f`.`post_id` AND `f`.`lang_id`=1 LEFT JOIN post_translation r ON `p`.`post_id` = `r`.`post_id` AND `r`.`lang_id`=2 WHERE p.post_id IN (641148, 706939, 818165, 664212, 541781, 808059, 482605, 642064, 817877, 756472, 810824, 742804, 708462, 816882, 631170, 640534, 532913, 386016, 518493, 778366, 770912, 533007, 825831, 790359, 600968, 770881, 476109, 732316, 819151, 805484);
|
3.71 ms (4.68%)
|
1 |
SELECT phc.post_id, phc.category_id, c.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_category phc INNER JOIN category c ON phc.category_id = c.category_id AND c.enabled = 1 LEFT JOIN category_translation f ON c.category_id = f.category_id AND f.lang_id=? LEFT JOIN category_translation r ON `c`.`category_id` = `r`.`category_id` AND `r`.`lang_id`=? WHERE phc.post_id IN (?, ?, ?)
Parameters: [
1
2
634782
810836
814360
]
SELECT phc.post_id, phc.category_id, c.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_category phc INNER JOIN category c ON phc.category_id = c.category_id AND c.enabled = 1 LEFT JOIN category_translation f ON c.category_id = f.category_id AND f.lang_id=1 LEFT JOIN category_translation r ON `c`.`category_id` = `r`.`category_id` AND `r`.`lang_id`=2 WHERE phc.post_id IN (634782, 810836, 814360);
|
3.28 ms (4.14%)
|
2 |
SELECT `phr`.`related_id`
FROM `post_has_related` as `phr`
LEFT JOIN `post` as `p` USING (`post_id`)
WHERE `phr`.`post_id` = ? AND `p`.`status` = ?
LIMIT ?
OFFSET ?
Parameters: [
828872
10
3
0
]
SELECT `phr`.`related_id`
FROM `post_has_related` as `phr`
LEFT JOIN `post` as `p` USING (`post_id`)
WHERE `phr`.`post_id` = 828872 AND `p`.`status` = 10
LIMIT 3
OFFSET 0
;
|
3.24 ms (4.09%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (828872, 810836, 151.42871),(828872, 814360, 145.33246),(828872, 634782, 141.03596),(828872, 641148, 141.00427),(828872, 706939, 140.51021),(828872, 818165, 137.19476),(828872, 664212, 137.1451),(828872, 541781, 136.86041),(828872, 808059, 136.74301),(828872, 482605, 136.04848),(828872, 642064, 135.32793),(828872, 817877, 134.96858),(828872, 756472, 133.95743),(828872, 810824, 132.54471),(828872, 742804, 132.46011),(828872, 708462, 132.44008),(828872, 816882, 130.35426),(828872, 631170, 130.11064),(828872, 640534, 129.90236),(828872, 532913, 129.53224),(828872, 386016, 129.1506),(828872, 518493, 128.29912),(828872, 778366, 128.03247),(828872, 770912, 127.73982),(828872, 533007, 127.045586),(828872, 825831, 126.42864),(828872, 790359, 125.547165),(828872, 600968, 125.52004),(828872, 770881, 125.43425),(828872, 476109, 125.21227),(828872, 732316, 125.028885),(828872, 819151, 124.86721),(828872, 805484, 124.67364)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (
`post_id`, `related_id`, `relevance`
)
VALUES
(828872, 810836, 151.42871),
(828872, 814360, 145.33246),
(828872, 634782, 141.03596),
(828872, 641148, 141.00427),
(828872, 706939, 140.51021),
(828872, 818165, 137.19476),
(828872, 664212, 137.1451),
(828872, 541781, 136.86041),
(828872, 808059, 136.74301),
(828872, 482605, 136.04848),
(828872, 642064, 135.32793),
(828872, 817877, 134.96858),
(828872, 756472, 133.95743),
(828872, 810824, 132.54471),
(828872, 742804, 132.46011),
(828872, 708462, 132.44008),
(828872, 816882, 130.35426),
(828872, 631170, 130.11064),
(828872, 640534, 129.90236),
(828872, 532913, 129.53224),
(828872, 386016, 129.1506),
(828872, 518493, 128.29912),
(828872, 778366, 128.03247),
(828872, 770912, 127.73982),
(828872, 533007, 127.045586),
(828872, 825831, 126.42864),
(828872, 790359, 125.547165),
(828872, 600968, 125.52004),
(828872, 770881, 125.43425),
(828872, 476109, 125.21227),
(828872, 732316, 125.028885),
(828872, 819151, 124.86721),
(828872, 805484, 124.67364) ON DUPLICATE KEY
UPDATE
`post_id` = `post_id`,
`related_id` = `related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (828872, 810836, 151.42871),(828872, 814360, 145.33246),(828872, 634782, 141.03596),(828872, 641148, 141.00427),(828872, 706939, 140.51021),(828872, 818165, 137.19476),(828872, 664212, 137.1451),(828872, 541781, 136.86041),(828872, 808059, 136.74301),(828872, 482605, 136.04848),(828872, 642064, 135.32793),(828872, 817877, 134.96858),(828872, 756472, 133.95743),(828872, 810824, 132.54471),(828872, 742804, 132.46011),(828872, 708462, 132.44008),(828872, 816882, 130.35426),(828872, 631170, 130.11064),(828872, 640534, 129.90236),(828872, 532913, 129.53224),(828872, 386016, 129.1506),(828872, 518493, 128.29912),(828872, 778366, 128.03247),(828872, 770912, 127.73982),(828872, 533007, 127.045586),(828872, 825831, 126.42864),(828872, 790359, 125.547165),(828872, 600968, 125.52004),(828872, 770881, 125.43425),(828872, 476109, 125.21227),(828872, 732316, 125.028885),(828872, 819151, 124.86721),(828872, 805484, 124.67364)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
3.24 ms (4.09%)
|
1 |
SELECT phc.post_id, phc.category_id, c.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_category phc INNER JOIN category c ON phc.category_id = c.category_id AND c.enabled = 1 LEFT JOIN category_translation f ON c.category_id = f.category_id AND f.lang_id=? LEFT JOIN category_translation r ON `c`.`category_id` = `r`.`category_id` AND `r`.`lang_id`=? WHERE phc.post_id IN (?)
Parameters: [
1
2
828872
]
SELECT phc.post_id, phc.category_id, c.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_category phc INNER JOIN category c ON phc.category_id = c.category_id AND c.enabled = 1 LEFT JOIN category_translation f ON c.category_id = f.category_id AND f.lang_id=1 LEFT JOIN category_translation r ON `c`.`category_id` = `r`.`category_id` AND `r`.`lang_id`=2 WHERE phc.post_id IN (828872);
|
2.63 ms (3.32%)
|
2 |
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = ?
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = 828872
;
|
2.24 ms (2.82%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (828872, 810836, 151.42871),(828872, 814360, 145.33246),(828872, 634782, 141.03596)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (828872, 810836, 151.42871),(828872, 814360, 145.33246),(828872, 634782, 141.03596)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
2.10 ms (2.65%)
|
1 |
SELECT p.post_id, p.user_id, p.content_id, p.channel_id, p.public_key, p.cover, p.type, p.sexual_orientation, p.orientation, p.quality, p.noindex, p.nofollow, p.contents_num, p.duration, p.likes, p.dislikes, p.views, p.vote_rating, p.params, p.status, p.published_at, u.username, IFNULL(`r`.`title`, `f`.`title`) as `title`, IFNULL(`r`.`description`, `f`.`description`) as `description`, IFNULL(`r`.`custom1`, `f`.`custom1`) as `custom1`, IFNULL(`r`.`custom2`, `f`.`custom2`) as `custom2` FROM post p LEFT JOIN post_translation f ON `p`.`post_id` = `f`.`post_id` AND `f`.`lang_id`=? LEFT JOIN user u ON `p`.`user_id` = `u`.`user_id` LEFT JOIN post_translation r ON `p`.`post_id` = `r`.`post_id` AND `r`.`lang_id`=? WHERE `p`.`public_key` = ? LIMIT 1
Parameters: [
1
2
"KEU5S18"
]
SELECT p.post_id, p.user_id, p.content_id, p.channel_id, p.public_key, p.cover, p.type, p.sexual_orientation, p.orientation, p.quality, p.noindex, p.nofollow, p.contents_num, p.duration, p.likes, p.dislikes, p.views, p.vote_rating, p.params, p.status, p.published_at, u.username, IFNULL(`r`.`title`, `f`.`title`) as `title`, IFNULL(`r`.`description`, `f`.`description`) as `description`, IFNULL(`r`.`custom1`, `f`.`custom1`) as `custom1`, IFNULL(`r`.`custom2`, `f`.`custom2`) as `custom2` FROM post p LEFT JOIN post_translation f ON `p`.`post_id` = `f`.`post_id` AND `f`.`lang_id`=1 LEFT JOIN user u ON `p`.`user_id` = `u`.`user_id` LEFT JOIN post_translation r ON `p`.`post_id` = `r`.`post_id` AND `r`.`lang_id`=2 WHERE `p`.`public_key` = 'KEU5S18' LIMIT 1;
|
2.05 ms (2.59%)
|
1 |
SELECT pht.post_id, pht.tag_id, t.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_tag pht INNER JOIN tag t ON pht.tag_id = t.tag_id AND t.enabled = 1 LEFT JOIN tag_translation f ON t.tag_id = f.tag_id AND f.lang_id=? LEFT JOIN tag_translation r ON `t`.`tag_id` = `r`.`tag_id` AND `r`.`lang_id`=? WHERE pht.post_id IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
1
2
386016
476109
482605
518493
532913
533007
541781
600968
631170
640534
641148
642064
664212
706939
708462
732316
742804
756472
770881
770912
778366
790359
805484
808059
810824
816882
817877
818165
819151
825831
]
SELECT pht.post_id, pht.tag_id, t.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_tag pht INNER JOIN tag t ON pht.tag_id = t.tag_id AND t.enabled = 1 LEFT JOIN tag_translation f ON t.tag_id = f.tag_id AND f.lang_id=1 LEFT JOIN tag_translation r ON `t`.`tag_id` = `r`.`tag_id` AND `r`.`lang_id`=2 WHERE pht.post_id IN (386016, 476109, 482605, 518493, 532913, 533007, 541781, 600968, 631170, 640534, 641148, 642064, 664212, 706939, 708462, 732316, 742804, 756472, 770881, 770912, 778366, 790359, 805484, 808059, 810824, 816882, 817877, 818165, 819151, 825831);
|
1.89 ms (2.38%)
|
1 |
SELECT p.post_id, p.user_id, p.content_id, p.public_key, p.search_field, p.cover, p.type, p.sexual_orientation, p.orientation, p.quality, p.noindex, p.nofollow, p.contents_num, p.duration, p.likes, p.dislikes, p.views, p.vote_rating, p.params, p.published_at, IFNULL(`r`.`title`, `f`.`title`) as `title`, IFNULL(`r`.`custom1`, `f`.`custom1`) as `custom1`, IFNULL(`r`.`custom2`, `f`.`custom2`) as `custom2` FROM post p LEFT JOIN post_translation f ON `p`.`post_id` = `f`.`post_id` AND `f`.`lang_id`=? LEFT JOIN post_translation r ON `p`.`post_id` = `r`.`post_id` AND `r`.`lang_id`=? WHERE p.post_id IN (?, ?, ?)
Parameters: [
1
2
810836
814360
634782
]
SELECT p.post_id, p.user_id, p.content_id, p.public_key, p.search_field, p.cover, p.type, p.sexual_orientation, p.orientation, p.quality, p.noindex, p.nofollow, p.contents_num, p.duration, p.likes, p.dislikes, p.views, p.vote_rating, p.params, p.published_at, IFNULL(`r`.`title`, `f`.`title`) as `title`, IFNULL(`r`.`custom1`, `f`.`custom1`) as `custom1`, IFNULL(`r`.`custom2`, `f`.`custom2`) as `custom2` FROM post p LEFT JOIN post_translation f ON `p`.`post_id` = `f`.`post_id` AND `f`.`lang_id`=1 LEFT JOIN post_translation r ON `p`.`post_id` = `r`.`post_id` AND `r`.`lang_id`=2 WHERE p.post_id IN (810836, 814360, 634782);
|
1.64 ms (2.06%)
|
1 |
SELECT pc.content_id, pc.post_id, pc.path, pc.width, pc.height FROM post_content pc WHERE pc.post_id IN (?)
SELECT pc.content_id, pc.post_id, pc.path, pc.width, pc.height FROM post_content pc WHERE pc.post_id IN (828872);
|
1.62 ms (2.04%)
|
1 |
SELECT pht.post_id, pht.tag_id, t.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_tag pht INNER JOIN tag t ON pht.tag_id = t.tag_id AND t.enabled = 1 LEFT JOIN tag_translation f ON t.tag_id = f.tag_id AND f.lang_id=? LEFT JOIN tag_translation r ON `t`.`tag_id` = `r`.`tag_id` AND `r`.`lang_id`=? WHERE pht.post_id IN (?)
Parameters: [
1
2
828872
]
SELECT pht.post_id, pht.tag_id, t.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_tag pht INNER JOIN tag t ON pht.tag_id = t.tag_id AND t.enabled = 1 LEFT JOIN tag_translation f ON t.tag_id = f.tag_id AND f.lang_id=1 LEFT JOIN tag_translation r ON `t`.`tag_id` = `r`.`tag_id` AND `r`.`lang_id`=2 WHERE pht.post_id IN (828872);
|
1.53 ms (1.92%)
|
1 |
SELECT pht.post_id, pht.tag_id, t.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_tag pht INNER JOIN tag t ON pht.tag_id = t.tag_id AND t.enabled = 1 LEFT JOIN tag_translation f ON t.tag_id = f.tag_id AND f.lang_id=? LEFT JOIN tag_translation r ON `t`.`tag_id` = `r`.`tag_id` AND `r`.`lang_id`=? WHERE pht.post_id IN (?, ?, ?)
Parameters: [
1
2
634782
810836
814360
]
SELECT pht.post_id, pht.tag_id, t.slug, IFNULL(`r`.`name`, `f`.`name`) as `name` FROM post_has_tag pht INNER JOIN tag t ON pht.tag_id = t.tag_id AND t.enabled = 1 LEFT JOIN tag_translation f ON t.tag_id = f.tag_id AND f.lang_id=1 LEFT JOIN tag_translation r ON `t`.`tag_id` = `r`.`tag_id` AND `r`.`lang_id`=2 WHERE pht.post_id IN (634782, 810836, 814360);
|
1.52 ms (1.91%)
|
1 |
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`;
|