SELECT `ui`.`id` AS `image_id`,
`ui`.`user_id` AS `user_id`,
`ui`.`create_date` AS `image_create_date`,
`ui`.`name` AS `image_name`,
`ui`.`title` AS `image_title`,
`ui`.`descr` AS `image_descr`,
`ui`.`views` AS `image_views`,
`ui`.`plus` AS `image_plus`,
`ui`.`minus` AS `image_minus`,
`bu`.`first_name` AS `user_first_name`,
`bu`.`last_name` AS `user_last_name`,
`bu`.`photo` AS `user_photo`,
COUNT(`c`.`id`) AS `com_cnt`
FROM `user_images` AS `ui`
LEFT JOIN `bpl_users` AS `bu` ON `bu`.`id` = `ui`.`user_id`
LEFT JOIN `comments` AS `c` ON `c`.`image_id` = `ui`.`id`
GROUP BY `ui`.`id`
ORDER BY `ui`.`create_date` DESC LIMIT 9
и добавтье в схему индекс
CREATE INDEX `image_id_idx` ON `comments` (`image_id`);