0

I am trying to trace a query that causes our server to exhaust 85% of the CPU.

The query I found in profiler is: SELECT COUNT(*) FROM table where foreignId = ? and isActive = ?

so I tried to navigate in the codebase where this query is.

I tried searching:

  1. SELECT COUNT(*) FROM table where foreignId = - I found two occurrence, but I can't find anything that has and isActive = value.
  2. FROM table where foreignId = value and isActive = value - I also found two occurrence, but no COUNT(*) from the raw query. However, I can see that after the query, there is a $query->rowCount() being executed.

My question is.

For #2, does $query->rowCount() perhaps being captured as SELECT COUNT(*) FROM table where foreignId = ? and isActive = ? in the database profiler?

nwantiti
  • 41
  • 4

0 Answers0