When I search .
Right now when the query sql query is this :
select * from `account` where `company_id` = 258 and exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `employee_status_id` = 1) and (`firstname` like '%lisa%' or `lastname` like '%lisa%' or ((exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `employee_status_id` like '%lisa%'))) or exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `employee_no` like '%lisa%') or (exists (select * from `user_role` where `account`.`user_role_id` = `user_role`.`id` and `name` like '%lisa%')) or `designation` like '%lisa%' or `phone` like '%lisa%' or `mobile` like '%lisa%' or exists (select * from `user` where `account`.`user_id` = `user`.`id` and `email` like '%lisa%') or exists (select * from `user` where `account`.`user_id` = `user`.`id` and `username` like '%lisa%') or exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `address` like '%lisa%') or `created_time` like '%lisa%' or `updated_time` like '%lisa%') order by `account`.`id` asc limit 10 offset 0
select * from `account` where `company_id` = 258 and exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `employee_status_id` = 1) and (`firstname` like '%lisa%' or `lastname` like '%lisa%' or ((exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `employee_status_id` like '%lisa%'))) or exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `employee_no` like '%lisa%') or (exists (select * from `user_role` where `account`.`user_role_id` = `user_role`.`id` and `name` like '%lisa%')) or `designation` like '%lisa%' or `phone` like '%lisa%' or `mobile` like '%lisa%' or exists (select * from `user` where `account`.`user_id` = `user`.`id` and `email` like '%lisa%') or exists (select * from `user` where `account`.`user_id` = `user`.`id` and `username` like '%lisa%') or exists (select * from `employee` where `account`.`id` = `employee`.`account_id` and `address` like '%lisa%') or `created_time` like '%lisa%' or `updated_time` like '%lisa%') order by `account`.`id` asc limit 10 offset 0
how do i improve this ? can i join table ? or did i do something wrong .