Friendship.php#305proddb83.87msselect friends.friend_user_id, friends.friend_favour, t4.parent_id from (
SELECT
IF(
t2.id ISNOTNULL,
t1.second_user,
IF(
t3.id ISNOTNULL,
t1.first_user,
NULL
)
) AS friend_user_id, friend_favour
FROM friendships AS t1
LEFTJOIN users AS t2 ON t1.first_user = t2.id and t2.id =14675LEFTJOIN users AS t3 ON t1.second_user = t3.id and t3.id =14675where (t1.first_user =14675or t1.second_user =14675) and (t1.status ='confirmed')
GROUPBY friend_user_id
ORDERBY t1.id desc
) as friends innerjoin `users` as `t4` on `t4`.`id` = `friends`.`friend_user_id` leftjoin `personalinformations` as `t5` on `t5`.`user_id` = `friends`.`friend_user_id` leftjoin `attending_addreses` as `t6` on `t6`.`user_id` = `friends`.`friend_user_id` leftjoin `states` as `t7` on `t7`.`id` = `t6`.`state` where `t4`.`deleted_at` isnull
PeopleController.php#490proddb208msselect `users`.*, (selectcount(*) from `wholesale_products` where `users`.`id` = `wholesale_products`.`user_id` and `wholesale_products`.`deleted_at` isnull) as `products_count`, (selectcount(*) from `post_attachments` where `users`.`id` = `post_attachments`.`user_id` and `type` =2) as `videos_count`, (selectcount(*) from `post_attachments` where `users`.`id` = `post_attachments`.`user_id` and `type` =1) as `images_count` from `users` where `id` in (1, 21913, 17770, 19980, 20719, 21855, 14804, 14820, 17319, 17757, 17548, 17679, 19987, 19267, 16389, 22084, 22040, 19881, 17669, 15391, 17739, 20627, 18172, 19819, 21831, 22220, 17241, 18016, 17266, 17304) and `users`.`deleted_at` isnullorderby `first_name` asc