38.12 ms (44.69%)
|
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
391662
448282
454533
455471
458223
470411
473784
479401
483654
493191
493997
503292
553545
555663
559740
577400
605698
620121
620124
693952
721241
738247
761603
761624
761633
761642
762274
782187
784292
820167
]
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 (391662, 448282, 454533, 455471, 458223, 470411, 473784, 479401, 483654, 493191, 493997, 503292, 553545, 555663, 559740, 577400, 605698, 620121, 620124, 693952, 721241, 738247, 761603, 761624, 761633, 761642, 762274, 782187, 784292, 820167);
|
8.37 ms (9.81%)
|
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
782123
]
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 (782123);
|
5.78 ms (6.78%)
|
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
761611
782125
782179
]
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 (761611, 782125, 782179);
|
5.58 ms (6.54%)
|
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
761642
479401
784292
620121
555663
620124
761603
577400
782187
493997
721241
605698
455471
553545
693952
559740
473784
391662
761624
448282
493191
820167
458223
454533
762274
470411
761633
483654
738247
503292
]
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 (761642, 479401, 784292, 620121, 555663, 620124, 761603, 577400, 782187, 493997, 721241, 605698, 455471, 553545, 693952, 559740, 473784, 391662, 761624, 448282, 493191, 820167, 458223, 454533, 762274, 470411, 761633, 483654, 738247, 503292);
|
3.57 ms (4.18%)
|
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: [
782123
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` = 782123 AND `p`.`status` = 10
LIMIT 3
OFFSET 0
;
|
3.31 ms (3.88%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (782123, 782179, 92.977974),(782123, 761611, 80.1477),(782123, 782125, 78.17633)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (782123, 782179, 92.977974),(782123, 761611, 80.1477),(782123, 782125, 78.17633)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
3.31 ms (3.87%)
|
1 |
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (782123, 782179, 92.977974),(782123, 761611, 80.1477),(782123, 782125, 78.17633),(782123, 761642, 76.839355),(782123, 479401, 76.69097),(782123, 784292, 75.0464),(782123, 620121, 74.70517),(782123, 555663, 73.827324),(782123, 620124, 72.84561),(782123, 761603, 72.63247),(782123, 577400, 71.88517),(782123, 782187, 71.33927),(782123, 493997, 71.22559),(782123, 721241, 70.625984),(782123, 605698, 70.286736),(782123, 455471, 70.05003),(782123, 553545, 70.04618),(782123, 693952, 69.420105),(782123, 559740, 69.12685),(782123, 473784, 69.087524),(782123, 391662, 69.03724),(782123, 761624, 68.69835),(782123, 448282, 68.2316),(782123, 493191, 67.69921),(782123, 820167, 67.592735),(782123, 458223, 67.341095),(782123, 454533, 67.25308),(782123, 762274, 67.21456),(782123, 470411, 67.1557),(782123, 761633, 67.05137),(782123, 483654, 66.4047),(782123, 738247, 65.64956),(782123, 503292, 65.606285)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
INSERT INTO `post_has_related` (
`post_id`, `related_id`, `relevance`
)
VALUES
(782123, 782179, 92.977974),
(782123, 761611, 80.1477),
(782123, 782125, 78.17633),
(782123, 761642, 76.839355),
(782123, 479401, 76.69097),
(782123, 784292, 75.0464),
(782123, 620121, 74.70517),
(782123, 555663, 73.827324),
(782123, 620124, 72.84561),
(782123, 761603, 72.63247),
(782123, 577400, 71.88517),
(782123, 782187, 71.33927),
(782123, 493997, 71.22559),
(782123, 721241, 70.625984),
(782123, 605698, 70.286736),
(782123, 455471, 70.05003),
(782123, 553545, 70.04618),
(782123, 693952, 69.420105),
(782123, 559740, 69.12685),
(782123, 473784, 69.087524),
(782123, 391662, 69.03724),
(782123, 761624, 68.69835),
(782123, 448282, 68.2316),
(782123, 493191, 67.69921),
(782123, 820167, 67.592735),
(782123, 458223, 67.341095),
(782123, 454533, 67.25308),
(782123, 762274, 67.21456),
(782123, 470411, 67.1557),
(782123, 761633, 67.05137),
(782123, 483654, 66.4047),
(782123, 738247, 65.64956),
(782123, 503292, 65.606285) ON DUPLICATE KEY
UPDATE
`post_id` = `post_id`,
`related_id` = `related_id`
INSERT INTO `post_has_related` (`post_id`, `related_id`, `relevance`)
VALUES (782123, 782179, 92.977974),(782123, 761611, 80.1477),(782123, 782125, 78.17633),(782123, 761642, 76.839355),(782123, 479401, 76.69097),(782123, 784292, 75.0464),(782123, 620121, 74.70517),(782123, 555663, 73.827324),(782123, 620124, 72.84561),(782123, 761603, 72.63247),(782123, 577400, 71.88517),(782123, 782187, 71.33927),(782123, 493997, 71.22559),(782123, 721241, 70.625984),(782123, 605698, 70.286736),(782123, 455471, 70.05003),(782123, 553545, 70.04618),(782123, 693952, 69.420105),(782123, 559740, 69.12685),(782123, 473784, 69.087524),(782123, 391662, 69.03724),(782123, 761624, 68.69835),(782123, 448282, 68.2316),(782123, 493191, 67.69921),(782123, 820167, 67.592735),(782123, 458223, 67.341095),(782123, 454533, 67.25308),(782123, 762274, 67.21456),(782123, 470411, 67.1557),(782123, 761633, 67.05137),(782123, 483654, 66.4047),(782123, 738247, 65.64956),(782123, 503292, 65.606285)
ON DUPLICATE KEY UPDATE `post_id`=`post_id`, `related_id`=`related_id`
;
|
3.15 ms (3.70%)
|
2 |
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = ?
SELECT `post_id`, `search_field`
FROM `post`
WHERE `post_id` = 782123
;
|
2.79 ms (3.27%)
|
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
"JS2TKwG"
]
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` = 'JS2TKwG' LIMIT 1;
|
2.62 ms (3.07%)
|
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
782179
761611
782125
]
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 (782179, 761611, 782125);
|
1.84 ms (2.15%)
|
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
761611
782125
782179
]
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 (761611, 782125, 782179);
|
1.82 ms (2.13%)
|
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
391662
448282
454533
455471
458223
470411
473784
479401
483654
493191
493997
503292
553545
555663
559740
577400
605698
620121
620124
693952
721241
738247
761603
761624
761633
761642
762274
782187
784292
820167
]
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 (391662, 448282, 454533, 455471, 458223, 470411, 473784, 479401, 483654, 493191, 493997, 503292, 553545, 555663, 559740, 577400, 605698, 620121, 620124, 693952, 721241, 738247, 761603, 761624, 761633, 761642, 762274, 782187, 784292, 820167);
|
1.76 ms (2.06%)
|
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
782123
]
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 (782123);
|
1.68 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 (782123);
|
1.63 ms (1.91%)
|
1 |
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`
SELECT `lang_id`, `code`, `name`, `icon` FROM `lang`;
|