47.44 ms (52.89%)
|
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
481678
500959
530570
531465
544459
546542
553782
563782
583414
583456
587117
608165
610252
613351
614883
636946
639226
654257
661976
707690
765341
768106
768233
783505
790839
793737
793766
809246
818837
]
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 (481678, 500959, 530570, 531465, 544459, 546542, 553782, 563782, 583414, 583456, 587117, 608165, 610252, 613351, 614883, 636946, 639226, 654257, 661976, 707690, 765341, 768106, 768233, 783505, 790839, 793737, 793766, 809246, 818837);
|
8.79 ms (9.80%)
|
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
484807
500770
525366
]
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 (484807, 500770, 525366);
|
4.76 ms (5.30%)
|
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
481678
768106
790839
707690
654257
530570
531465
793766
793737
500959
658129
614883
610252
563782
546542
553782
765341
809246
768233
636946
783505
583456
661976
818837
613351
608165
587117
583414
544459
639226
]
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 (481678, 768106, 790839, 707690, 654257, 530570, 531465, 793766, 793737, 500959, 658129, 614883, 610252, 563782, 546542, 553782, 765341, 809246, 768233, 636946, 783505, 583456, 661976, 818837, 613351, 608165, 587117, 583414, 544459, 639226);
|
4.62 ms (5.15%)
|
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: [
791266
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` = 791266 AND `p`.`status` = 10
LIMIT 3
OFFSET 0
;
|
3.84 ms (4.28%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (791266, 537760, 49.065998),(791266, 677069, 48.346664),(791266, 503438, 48.20144),(791266, 481678, 48.059845),(791266, 768106, 47.34638),(791266, 790839, 47.23123),(791266, 707690, 45.853786),(791266, 654257, 45.74207),(791266, 530570, 45.554214),(791266, 531465, 45.41863),(791266, 793766, 45.09193),(791266, 793737, 44.933117),(791266, 500959, 44.531757),(791266, 658129, 44.497284),(791266, 614883, 44.476788),(791266, 610252, 44.433487),(791266, 563782, 44.02443),(791266, 546542, 43.97835),(791266, 553782, 43.792698),(791266, 765341, 43.679832),(791266, 809246, 43.32805),(791266, 768233, 43.30749),(791266, 636946, 43.235382),(791266, 783505, 43.15213),(791266, 583456, 43.09618),(791266, 661976, 42.96009),(791266, 818837, 42.881145),(791266, 613351, 42.84074),(791266, 608165, 42.833115),(791266, 587117, 42.75423),(791266, 583414, 42.719074),(791266, 544459, 42.716133),(791266, 639226, 42.697845)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (
`post_id`, `related_id`, `relevance`
)
VALUES
(791266, 537760, 49.065998),
(791266, 677069, 48.346664),
(791266, 503438, 48.20144),
(791266, 481678, 48.059845),
(791266, 768106, 47.34638),
(791266, 790839, 47.23123),
(791266, 707690, 45.853786),
(791266, 654257, 45.74207),
(791266, 530570, 45.554214),
(791266, 531465, 45.41863),
(791266, 793766, 45.09193),
(791266, 793737, 44.933117),
(791266, 500959, 44.531757),
(791266, 658129, 44.497284),
(791266, 614883, 44.476788),
(791266, 610252, 44.433487),
(791266, 563782, 44.02443),
(791266, 546542, 43.97835),
(791266, 553782, 43.792698),
(791266, 765341, 43.679832),
(791266, 809246, 43.32805),
(791266, 768233, 43.30749),
(791266, 636946, 43.235382),
(791266, 783505, 43.15213),
(791266, 583456, 43.09618),
(791266, 661976, 42.96009),
(791266, 818837, 42.881145),
(791266, 613351, 42.84074),
(791266, 608165, 42.833115),
(791266, 587117, 42.75423),
(791266, 583414, 42.719074),
(791266, 544459, 42.716133),
(791266, 639226, 42.697845) ON DUPLICATE KEY
UPDATE
`post_id` = `post_id`,
`related_id` = `related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (791266, 537760, 49.065998),(791266, 677069, 48.346664),(791266, 503438, 48.20144),(791266, 481678, 48.059845),(791266, 768106, 47.34638),(791266, 790839, 47.23123),(791266, 707690, 45.853786),(791266, 654257, 45.74207),(791266, 530570, 45.554214),(791266, 531465, 45.41863),(791266, 793766, 45.09193),(791266, 793737, 44.933117),(791266, 500959, 44.531757),(791266, 658129, 44.497284),(791266, 614883, 44.476788),(791266, 610252, 44.433487),(791266, 563782, 44.02443),(791266, 546542, 43.97835),(791266, 553782, 43.792698),(791266, 765341, 43.679832),(791266, 809246, 43.32805),(791266, 768233, 43.30749),(791266, 636946, 43.235382),(791266, 783505, 43.15213),(791266, 583456, 43.09618),(791266, 661976, 42.96009),(791266, 818837, 42.881145),(791266, 613351, 42.84074),(791266, 608165, 42.833115),(791266, 587117, 42.75423),(791266, 583414, 42.719074),(791266, 544459, 42.716133),(791266, 639226, 42.697845)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
3.77 ms (4.20%)
|
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
791266
]
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 (791266);
|
2.45 ms (2.73%)
|
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
484807
500770
525366
]
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 (484807, 500770, 525366);
|
2.41 ms (2.69%)
|
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
484807
500770
525366
]
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 (484807, 500770, 525366);
|
2.38 ms (2.66%)
|
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
"n3r_X1-"
]
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` = 'n3r_X1-' LIMIT 1;
|
2.13 ms (2.37%)
|
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
481678
500959
530570
531465
544459
546542
553782
563782
583414
583456
587117
608165
610252
613351
614883
636946
639226
654257
661976
707690
765341
768106
768233
783505
790839
793737
793766
809246
818837
]
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 (481678, 500959, 530570, 531465, 544459, 546542, 553782, 563782, 583414, 583456, 587117, 608165, 610252, 613351, 614883, 636946, 639226, 654257, 661976, 707690, 765341, 768106, 768233, 783505, 790839, 793737, 793766, 809246, 818837);
|
2.03 ms (2.26%)
|
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
791266
]
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 (791266);
|
1.74 ms (1.95%)
|
1 |
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`;
|
1.71 ms (1.91%)
|
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 (791266);
|
1.62 ms (1.80%)
|
1 |
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = ?
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = 791266
;
|