43.22 ms (50.84%)
|
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
422089
437401
495246
553264
568728
582678
597441
605503
647805
709669
725240
733155
733342
759648
759913
767294
783093
793826
794182
810066
810110
810330
813987
818754
823255
823860
823973
823974
824848
826631
]
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 (422089, 437401, 495246, 553264, 568728, 582678, 597441, 605503, 647805, 709669, 725240, 733155, 733342, 759648, 759913, 767294, 783093, 793826, 794182, 810066, 810110, 810330, 813987, 818754, 823255, 823860, 823973, 823974, 824848, 826631);
|
4.99 ms (5.87%)
|
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
826631
647805
813987
824848
823255
810066
553264
437401
783093
725240
568728
582678
597441
818754
759648
495246
823973
767294
823974
759913
605503
810330
793826
733342
733155
810110
794182
823860
422089
709669
]
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 (826631, 647805, 813987, 824848, 823255, 810066, 553264, 437401, 783093, 725240, 568728, 582678, 597441, 818754, 759648, 495246, 823973, 767294, 823974, 759913, 605503, 810330, 793826, 733342, 733155, 810110, 794182, 823860, 422089, 709669);
|
4.53 ms (5.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
612233
809904
814127
]
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 (612233, 809904, 814127);
|
4.45 ms (5.23%)
|
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
823448
]
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 (823448);
|
4.10 ms (4.82%)
|
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: [
823448
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` = 823448 AND `p`.`status` = 10
LIMIT 3
OFFSET 0
;
|
3.47 ms (4.09%)
|
2 |
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = ?
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = 823448
;
|
3.10 ms (3.65%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (823448, 612233, 53.758076),(823448, 809904, 49.767323),(823448, 814127, 49.062664),(823448, 826631, 48.137638),(823448, 647805, 46.61292),(823448, 813987, 45.885468),(823448, 824848, 45.346336),(823448, 823255, 44.923138),(823448, 810066, 44.45926),(823448, 553264, 44.28867),(823448, 437401, 44.11535),(823448, 783093, 43.970924),(823448, 725240, 43.640533),(823448, 568728, 43.402542),(823448, 582678, 43.347496),(823448, 597441, 43.202194),(823448, 818754, 42.917267),(823448, 759648, 42.889988),(823448, 495246, 42.833973),(823448, 823973, 42.73738),(823448, 767294, 42.441017),(823448, 823974, 42.368896),(823448, 759913, 42.34244),(823448, 605503, 42.0322),(823448, 810330, 41.79867),(823448, 793826, 41.707546),(823448, 733342, 41.50355),(823448, 733155, 41.326138),(823448, 810110, 41.280235),(823448, 794182, 41.052208),(823448, 823860, 41.04144),(823448, 422089, 40.805286),(823448, 709669, 40.752674)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (
`post_id`, `related_id`, `relevance`
)
VALUES
(823448, 612233, 53.758076),
(823448, 809904, 49.767323),
(823448, 814127, 49.062664),
(823448, 826631, 48.137638),
(823448, 647805, 46.61292),
(823448, 813987, 45.885468),
(823448, 824848, 45.346336),
(823448, 823255, 44.923138),
(823448, 810066, 44.45926),
(823448, 553264, 44.28867),
(823448, 437401, 44.11535),
(823448, 783093, 43.970924),
(823448, 725240, 43.640533),
(823448, 568728, 43.402542),
(823448, 582678, 43.347496),
(823448, 597441, 43.202194),
(823448, 818754, 42.917267),
(823448, 759648, 42.889988),
(823448, 495246, 42.833973),
(823448, 823973, 42.73738),
(823448, 767294, 42.441017),
(823448, 823974, 42.368896),
(823448, 759913, 42.34244),
(823448, 605503, 42.0322),
(823448, 810330, 41.79867),
(823448, 793826, 41.707546),
(823448, 733342, 41.50355),
(823448, 733155, 41.326138),
(823448, 810110, 41.280235),
(823448, 794182, 41.052208),
(823448, 823860, 41.04144),
(823448, 422089, 40.805286),
(823448, 709669, 40.752674) ON DUPLICATE KEY
UPDATE
`post_id` = `post_id`,
`related_id` = `related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (823448, 612233, 53.758076),(823448, 809904, 49.767323),(823448, 814127, 49.062664),(823448, 826631, 48.137638),(823448, 647805, 46.61292),(823448, 813987, 45.885468),(823448, 824848, 45.346336),(823448, 823255, 44.923138),(823448, 810066, 44.45926),(823448, 553264, 44.28867),(823448, 437401, 44.11535),(823448, 783093, 43.970924),(823448, 725240, 43.640533),(823448, 568728, 43.402542),(823448, 582678, 43.347496),(823448, 597441, 43.202194),(823448, 818754, 42.917267),(823448, 759648, 42.889988),(823448, 495246, 42.833973),(823448, 823973, 42.73738),(823448, 767294, 42.441017),(823448, 823974, 42.368896),(823448, 759913, 42.34244),(823448, 605503, 42.0322),(823448, 810330, 41.79867),(823448, 793826, 41.707546),(823448, 733342, 41.50355),(823448, 733155, 41.326138),(823448, 810110, 41.280235),(823448, 794182, 41.052208),(823448, 823860, 41.04144),(823448, 422089, 40.805286),(823448, 709669, 40.752674)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
2.61 ms (3.08%)
|
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
"bGhLac7"
]
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` = 'bGhLac7' LIMIT 1;
|
2.49 ms (2.93%)
|
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
612233
809904
814127
]
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 (612233, 809904, 814127);
|
2.43 ms (2.86%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (823448, 612233, 53.758076),(823448, 809904, 49.767323),(823448, 814127, 49.062664)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (823448, 612233, 53.758076),(823448, 809904, 49.767323),(823448, 814127, 49.062664)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
2.06 ms (2.42%)
|
1 |
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`;
|
2.02 ms (2.38%)
|
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
823448
]
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 (823448);
|
1.94 ms (2.28%)
|
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
612233
809904
814127
]
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 (612233, 809904, 814127);
|
1.92 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
422089
437401
495246
553264
568728
582678
597441
605503
647805
709669
725240
733155
733342
759648
759913
767294
783093
793826
794182
810066
810110
810330
813987
818754
823255
823860
823973
823974
824848
826631
]
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 (422089, 437401, 495246, 553264, 568728, 582678, 597441, 605503, 647805, 709669, 725240, 733155, 733342, 759648, 759913, 767294, 783093, 793826, 794182, 810066, 810110, 810330, 813987, 818754, 823255, 823860, 823973, 823974, 824848, 826631);
|
1.65 ms (1.95%)
|
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 (823448);
|