Mysql Laravel expert Need — 9

  • Job DurationLess than a week
  • Project LevelBasic Level
  • Project deadlineExpired

Project detail

Making a little website with my Laravel. Clicking on the home page makes the CPU very high. I need a Laravel Mysql Expert.

SELECT * FROM posts WHERE status = 1 AND posts.worker_need> (SELECT COUNT (id) FROM prove WHERE job_id = posts.id AND (status = 0 OR status = 1))

Here is the second condition that I am counting = (SELECT COUNT (id) FROM prove WHERE job_id = posts.id AND (status = 0 OR status = 1)) With this query the whole server CPU becomes 100% just for this I wanted to know if there is any other way to do the count work where there will not be so much server load.
SELECT * FROM posts WHERE status=1 AND posts.worker_need > (SELECT COUNT(id) FROM prove WHERE job_id=posts.id AND (status = 0 OR status = 1))

Skills Required

Industry Categories

Freelancer type required for this project