82.72 ms (79.56%)
|
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
411581
412583
425050
429409
430018
430444
430630
430635
431269
433074
434638
437868
447706
448839
458010
458719
463842
466989
470441
471380
486944
489112
494985
496832
502043
502995
509164
510254
510286
512447
513025
515206
527008
527669
529213
531513
531981
534377
541588
541640
541643
541683
541871
541886
541888
549246
556535
560340
565783
571428
573393
576623
578326
590723
590878
598865
604161
626337
650806
]
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 (411581, 412583, 425050, 429409, 430018, 430444, 430630, 430635, 431269, 433074, 434638, 437868, 447706, 448839, 458010, 458719, 463842, 466989, 470441, 471380, 486944, 489112, 494985, 496832, 502043, 502995, 509164, 510254, 510286, 512447, 513025, 515206, 527008, 527669, 529213, 531513, 531981, 534377, 541588, 541640, 541643, 541683, 541871, 541886, 541888, 549246, 556535, 560340, 565783, 571428, 573393, 576623, 578326, 590723, 590878, 598865, 604161, 626337, 650806);
|
12.20 ms (11.73%)
|
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
515206
447706
531513
576623
509164
527669
489112
502043
412583
433074
458719
541886
434638
527008
470441
425050
471380
513025
486944
529213
534377
510254
463842
549246
573393
541643
541888
578326
541640
429409
437868
650806
626337
431269
430444
541683
604161
531981
571428
430630
448839
510286
556535
430635
502995
494985
565783
411581
466989
598865
430018
541588
458010
496832
541871
512447
590723
560340
590878
]
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 (515206, 447706, 531513, 576623, 509164, 527669, 489112, 502043, 412583, 433074, 458719, 541886, 434638, 527008, 470441, 425050, 471380, 513025, 486944, 529213, 534377, 510254, 463842, 549246, 573393, 541643, 541888, 578326, 541640, 429409, 437868, 650806, 626337, 431269, 430444, 541683, 604161, 531981, 571428, 430630, 448839, 510286, 556535, 430635, 502995, 494985, 565783, 411581, 466989, 598865, 430018, 541588, 458010, 496832, 541871, 512447, 590723, 560340, 590878);
|
2.15 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
411581
412583
425050
429409
430018
430444
430630
430635
431269
433074
434638
437868
447706
448839
458010
458719
463842
466989
470441
471380
486944
489112
494985
496832
502043
502995
509164
510254
510286
512447
513025
515206
527008
527669
529213
531513
531981
534377
541588
541640
541643
541683
541871
541886
541888
549246
556535
560340
565783
571428
573393
576623
578326
590723
590878
598865
604161
626337
650806
]
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 (411581, 412583, 425050, 429409, 430018, 430444, 430630, 430635, 431269, 433074, 434638, 437868, 447706, 448839, 458010, 458719, 463842, 466989, 470441, 471380, 486944, 489112, 494985, 496832, 502043, 502995, 509164, 510254, 510286, 512447, 513025, 515206, 527008, 527669, 529213, 531513, 531981, 534377, 541588, 541640, 541643, 541683, 541871, 541886, 541888, 549246, 556535, 560340, 565783, 571428, 573393, 576623, 578326, 590723, 590878, 598865, 604161, 626337, 650806);
|