selectcount(*) as aggregate from (select `bravo_tours`.*from `bravo_tours` innerjoin `bravo_locations` on `bravo_locations`.`id` = `bravo_tours`.`location_id` and `bravo_locations`.`_lft` >=27and `bravo_locations`.`_rgt` <=54where `bravo_tours`.`status` ='publish'and `bravo_tours`.`deleted_at` isnullgroupby `bravo_tours`.`id`) as `aggregate_table`9.29mscobaotaTourController.php#54
select*from `bravo_locations` where `bravo_locations`.`id` in (14, 17, 18, 19, 22) and `bravo_locations`.`deleted_at` isnull650μscobaotaTourController.php#54
Hints
0: Use SELECT * only if you need all columns from table
select `bravo_terms`.*, (selectcount(*) from `bravo_tours` innerjoin `bravo_tour_term` on `bravo_tours`.`id` = `bravo_tour_term`.`tour_id` where `bravo_terms`.`id` = `bravo_tour_term`.`term_id` and `bravo_tours`.`deleted_at` isnull) as `tour_count` from `bravo_terms` where `bravo_terms`.`attr_id` in (1, 2) and `bravo_terms`.`deleted_at` isnull5.61mscobaotaTourController.php#96