47.15 ms (56.13%)
|
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
401159
492605
505042
523230
553648
562489
569926
573306
585216
592054
604026
678552
703245
721310
721373
721420
722770
722822
722834
722836
722850
722852
741620
765271
773665
781490
783267
786034
786334
818088
]
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 (401159, 492605, 505042, 523230, 553648, 562489, 569926, 573306, 585216, 592054, 604026, 678552, 703245, 721310, 721373, 721420, 722770, 722822, 722834, 722836, 722850, 722852, 741620, 765271, 773665, 781490, 783267, 786034, 786334, 818088);
|
4.35 ms (5.18%)
|
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
786034
585216
722852
722822
722850
573306
569926
786334
721310
401159
722770
722836
492605
721373
765271
604026
722834
781490
505042
721420
818088
741620
553648
523230
783267
592054
678552
562489
703245
773665
]
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 (786034, 585216, 722852, 722822, 722850, 573306, 569926, 786334, 721310, 401159, 722770, 722836, 492605, 721373, 765271, 604026, 722834, 781490, 505042, 721420, 818088, 741620, 553648, 523230, 783267, 592054, 678552, 562489, 703245, 773665);
|
4.15 ms (4.95%)
|
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
806040
]
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 (806040);
|
3.72 ms (4.43%)
|
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: [
806040
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` = 806040 AND `p`.`status` = 10
LIMIT 3
OFFSET 0
;
|
3.61 ms (4.30%)
|
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
722719
722764
722819
]
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 (722719, 722764, 722819);
|
2.96 ms (3.53%)
|
2 |
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = ?
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = 806040
;
|
2.81 ms (3.35%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (806040, 722764, 67.18111),(806040, 722719, 63.788586),(806040, 722819, 63.72881),(806040, 786034, 62.865665),(806040, 585216, 60.542812),(806040, 722852, 59.084637),(806040, 722822, 59.08239),(806040, 722850, 59.029346),(806040, 573306, 58.31033),(806040, 569926, 58.10533),(806040, 786334, 57.89973),(806040, 721310, 57.884983),(806040, 401159, 57.11781),(806040, 722770, 56.753883),(806040, 722836, 56.713013),(806040, 492605, 56.194283),(806040, 721373, 55.503754),(806040, 765271, 55.410995),(806040, 604026, 55.229347),(806040, 722834, 54.866123),(806040, 781490, 54.547047),(806040, 505042, 54.459915),(806040, 721420, 54.421974),(806040, 818088, 53.747017),(806040, 741620, 53.005146),(806040, 553648, 52.960526),(806040, 523230, 52.845043),(806040, 783267, 52.835724),(806040, 592054, 52.32552),(806040, 678552, 51.864887),(806040, 562489, 51.819843),(806040, 703245, 51.376423),(806040, 773665, 51.245888)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (
`post_id`, `related_id`, `relevance`
)
VALUES
(806040, 722764, 67.18111),
(806040, 722719, 63.788586),
(806040, 722819, 63.72881),
(806040, 786034, 62.865665),
(806040, 585216, 60.542812),
(806040, 722852, 59.084637),
(806040, 722822, 59.08239),
(806040, 722850, 59.029346),
(806040, 573306, 58.31033),
(806040, 569926, 58.10533),
(806040, 786334, 57.89973),
(806040, 721310, 57.884983),
(806040, 401159, 57.11781),
(806040, 722770, 56.753883),
(806040, 722836, 56.713013),
(806040, 492605, 56.194283),
(806040, 721373, 55.503754),
(806040, 765271, 55.410995),
(806040, 604026, 55.229347),
(806040, 722834, 54.866123),
(806040, 781490, 54.547047),
(806040, 505042, 54.459915),
(806040, 721420, 54.421974),
(806040, 818088, 53.747017),
(806040, 741620, 53.005146),
(806040, 553648, 52.960526),
(806040, 523230, 52.845043),
(806040, 783267, 52.835724),
(806040, 592054, 52.32552),
(806040, 678552, 51.864887),
(806040, 562489, 51.819843),
(806040, 703245, 51.376423),
(806040, 773665, 51.245888) ON DUPLICATE KEY
UPDATE
`post_id` = `post_id`,
`related_id` = `related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (806040, 722764, 67.18111),(806040, 722719, 63.788586),(806040, 722819, 63.72881),(806040, 786034, 62.865665),(806040, 585216, 60.542812),(806040, 722852, 59.084637),(806040, 722822, 59.08239),(806040, 722850, 59.029346),(806040, 573306, 58.31033),(806040, 569926, 58.10533),(806040, 786334, 57.89973),(806040, 721310, 57.884983),(806040, 401159, 57.11781),(806040, 722770, 56.753883),(806040, 722836, 56.713013),(806040, 492605, 56.194283),(806040, 721373, 55.503754),(806040, 765271, 55.410995),(806040, 604026, 55.229347),(806040, 722834, 54.866123),(806040, 781490, 54.547047),(806040, 505042, 54.459915),(806040, 721420, 54.421974),(806040, 818088, 53.747017),(806040, 741620, 53.005146),(806040, 553648, 52.960526),(806040, 523230, 52.845043),(806040, 783267, 52.835724),(806040, 592054, 52.32552),(806040, 678552, 51.864887),(806040, 562489, 51.819843),(806040, 703245, 51.376423),(806040, 773665, 51.245888)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
2.70 ms (3.21%)
|
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
722764
722719
722819
]
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 (722764, 722719, 722819);
|
2.33 ms (2.77%)
|
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
"Upl2aCb"
]
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` = 'Upl2aCb' LIMIT 1;
|
1.99 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
401159
492605
505042
523230
553648
562489
569926
573306
585216
592054
604026
678552
703245
721310
721373
721420
722770
722822
722834
722836
722850
722852
741620
765271
773665
781490
783267
786034
786334
818088
]
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 (401159, 492605, 505042, 523230, 553648, 562489, 569926, 573306, 585216, 592054, 604026, 678552, 703245, 721310, 721373, 721420, 722770, 722822, 722834, 722836, 722850, 722852, 741620, 765271, 773665, 781490, 783267, 786034, 786334, 818088);
|
1.85 ms (2.20%)
|
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
806040
]
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 (806040);
|
1.73 ms (2.06%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (806040, 722764, 67.18111),(806040, 722719, 63.788586),(806040, 722819, 63.72881)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (806040, 722764, 67.18111),(806040, 722719, 63.788586),(806040, 722819, 63.72881)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
1.64 ms (1.96%)
|
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 (806040);
|
1.58 ms (1.88%)
|
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
722719
722764
722819
]
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 (722719, 722764, 722819);
|
1.41 ms (1.68%)
|
1 |
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`;
|