72.77 ms (73.99%)
|
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
401927
404876
410642
412969
415160
416998
417920
420222
429386
429633
430661
431112
431262
431540
442785
452828
454635
462840
465219
469566
469691
472931
479816
484017
484433
484475
485542
486678
488904
492320
498226
503127
507078
507663
510668
511418
512055
512094
512885
513141
516015
517808
518996
520697
522448
554526
555009
557537
563513
565978
569313
571029
581663
591354
598524
598649
598806
601616
609652
627679
]
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 (401927, 404876, 410642, 412969, 415160, 416998, 417920, 420222, 429386, 429633, 430661, 431112, 431262, 431540, 442785, 452828, 454635, 462840, 465219, 469566, 469691, 472931, 479816, 484017, 484433, 484475, 485542, 486678, 488904, 492320, 498226, 503127, 507078, 507663, 510668, 511418, 512055, 512094, 512885, 513141, 516015, 517808, 518996, 520697, 522448, 554526, 555009, 557537, 563513, 565978, 569313, 571029, 581663, 591354, 598524, 598649, 598806, 601616, 609652, 627679);
|
16.03 ms (16.29%)
|
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
431540
484433
565978
571029
401927
462840
442785
511418
512055
507078
555009
517808
554526
627679
512885
488904
516015
430661
469691
452828
454635
503127
601616
469566
417920
410642
416998
429386
429633
479816
484475
485542
522448
431112
404876
472931
492320
569313
412969
581663
591354
598524
609652
420222
465219
512094
518996
486678
498226
563513
598649
598806
431262
510668
520697
484017
507663
415160
513141
557537
]
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 (431540, 484433, 565978, 571029, 401927, 462840, 442785, 511418, 512055, 507078, 555009, 517808, 554526, 627679, 512885, 488904, 516015, 430661, 469691, 452828, 454635, 503127, 601616, 469566, 417920, 410642, 416998, 429386, 429633, 479816, 484475, 485542, 522448, 431112, 404876, 472931, 492320, 569313, 412969, 581663, 591354, 598524, 609652, 420222, 465219, 512094, 518996, 486678, 498226, 563513, 598649, 598806, 431262, 510668, 520697, 484017, 507663, 415160, 513141, 557537);
|
2.55 ms (2.60%)
|
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
401927
404876
410642
412969
415160
416998
417920
420222
429386
429633
430661
431112
431262
431540
442785
452828
454635
462840
465219
469566
469691
472931
479816
484017
484433
484475
485542
486678
488904
492320
498226
503127
507078
507663
510668
511418
512055
512094
512885
513141
516015
517808
518996
520697
522448
554526
555009
557537
563513
565978
569313
571029
581663
591354
598524
598649
598806
601616
609652
627679
]
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 (401927, 404876, 410642, 412969, 415160, 416998, 417920, 420222, 429386, 429633, 430661, 431112, 431262, 431540, 442785, 452828, 454635, 462840, 465219, 469566, 469691, 472931, 479816, 484017, 484433, 484475, 485542, 486678, 488904, 492320, 498226, 503127, 507078, 507663, 510668, 511418, 512055, 512094, 512885, 513141, 516015, 517808, 518996, 520697, 522448, 554526, 555009, 557537, 563513, 565978, 569313, 571029, 581663, 591354, 598524, 598649, 598806, 601616, 609652, 627679);
|