65.64 ms (76.96%)
|
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
459358
464624
486589
492215
499628
499830
500180
500506
503935
505717
508179
509678
509707
511492
518085
520482
522353
524327
528811
530524
533982
535429
548379
553914
553992
556643
559201
560434
565907
568981
569964
581684
587545
589015
591143
592332
593958
602526
602569
602612
604102
604295
606344
619738
619935
620117
622666
624833
626873
631083
653487
659407
677357
679373
682234
682421
687551
689755
]
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 (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
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 (459358, 464624, 486589, 492215, 499628, 499830, 500180, 500506, 503935, 505717, 508179, 509678, 509707, 511492, 518085, 520482, 522353, 524327, 528811, 530524, 533982, 535429, 548379, 553914, 553992, 556643, 559201, 560434, 565907, 568981, 569964, 581684, 587545, 589015, 591143, 592332, 593958, 602526, 602569, 602612, 604102, 604295, 606344, 619738, 619935, 620117, 622666, 624833, 626873, 631083, 653487, 659407, 677357, 679373, 682234, 682421, 687551, 689755);
|
9.23 ms (10.82%)
|
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
522353
548379
653487
524327
553914
565907
569964
559201
679373
606344
602612
619935
620117
631083
500506
518085
503935
508179
535429
505717
464624
687551
689755
587545
602526
589015
591143
509707
520482
560434
556643
568981
677357
619738
499628
509678
511492
604295
528811
659407
624833
604102
459358
499830
500180
682421
593958
592332
682234
626873
492215
530524
622666
533982
486589
581684
602569
553992
]
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 (522353, 548379, 653487, 524327, 553914, 565907, 569964, 559201, 679373, 606344, 602612, 619935, 620117, 631083, 500506, 518085, 503935, 508179, 535429, 505717, 464624, 687551, 689755, 587545, 602526, 589015, 591143, 509707, 520482, 560434, 556643, 568981, 677357, 619738, 499628, 509678, 511492, 604295, 528811, 659407, 624833, 604102, 459358, 499830, 500180, 682421, 593958, 592332, 682234, 626873, 492215, 530524, 622666, 533982, 486589, 581684, 602569, 553992);
|
3.18 ms (3.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
459358
464624
486589
492215
499628
499830
500180
500506
503935
505717
508179
509678
509707
511492
518085
520482
522353
524327
528811
530524
533982
535429
548379
553914
553992
556643
559201
560434
565907
568981
569964
581684
587545
589015
591143
592332
593958
602526
602569
602612
604102
604295
606344
619738
619935
620117
622666
624833
626873
631083
653487
659407
677357
679373
682234
682421
687551
689755
]
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 (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
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 (459358, 464624, 486589, 492215, 499628, 499830, 500180, 500506, 503935, 505717, 508179, 509678, 509707, 511492, 518085, 520482, 522353, 524327, 528811, 530524, 533982, 535429, 548379, 553914, 553992, 556643, 559201, 560434, 565907, 568981, 569964, 581684, 587545, 589015, 591143, 592332, 593958, 602526, 602569, 602612, 604102, 604295, 606344, 619738, 619935, 620117, 622666, 624833, 626873, 631083, 653487, 659407, 677357, 679373, 682234, 682421, 687551, 689755);
|