137.55 ms (87.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
389829
399717
402145
418879
439679
446050
446544
455923
461805
466172
476430
477359
480125
486376
486897
489113
502541
502722
503209
508076
508841
518334
519621
520492
523042
525432
529107
549839
552570
553648
557976
560006
572296
574486
576027
579353
581174
584090
585725
591378
594966
606016
611535
617056
621170
625884
627018
776869
]
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 (389829, 399717, 402145, 418879, 439679, 446050, 446544, 455923, 461805, 466172, 476430, 477359, 480125, 486376, 486897, 489113, 502541, 502722, 503209, 508076, 508841, 518334, 519621, 520492, 523042, 525432, 529107, 549839, 552570, 553648, 557976, 560006, 572296, 574486, 576027, 579353, 581174, 584090, 585725, 591378, 594966, 606016, 611535, 617056, 621170, 625884, 627018, 776869);
|
10.72 ms (6.80%)
|
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
776869
461805
572296
576027
502722
402145
520492
581174
518334
574486
627018
466172
523042
594966
519621
529107
584090
486376
549839
418879
508076
503209
557976
446544
489113
480125
439679
389829
455923
502541
486897
508841
579353
446050
476430
553648
621170
477359
552570
617056
525432
611535
399717
591378
625884
606016
560006
585725
]
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 (776869, 461805, 572296, 576027, 502722, 402145, 520492, 581174, 518334, 574486, 627018, 466172, 523042, 594966, 519621, 529107, 584090, 486376, 549839, 418879, 508076, 503209, 557976, 446544, 489113, 480125, 439679, 389829, 455923, 502541, 486897, 508841, 579353, 446050, 476430, 553648, 621170, 477359, 552570, 617056, 525432, 611535, 399717, 591378, 625884, 606016, 560006, 585725);
|
2.35 ms (1.49%)
|
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
389829
399717
402145
418879
439679
446050
446544
455923
461805
466172
476430
477359
480125
486376
486897
489113
502541
502722
503209
508076
508841
518334
519621
520492
523042
525432
529107
549839
552570
553648
557976
560006
572296
574486
576027
579353
581174
584090
585725
591378
594966
606016
611535
617056
621170
625884
627018
776869
]
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 (389829, 399717, 402145, 418879, 439679, 446050, 446544, 455923, 461805, 466172, 476430, 477359, 480125, 486376, 486897, 489113, 502541, 502722, 503209, 508076, 508841, 518334, 519621, 520492, 523042, 525432, 529107, 549839, 552570, 553648, 557976, 560006, 572296, 574486, 576027, 579353, 581174, 584090, 585725, 591378, 594966, 606016, 611535, 617056, 621170, 625884, 627018, 776869);
|