0

Can I somehow detect how much MySQL queries performed via old mysql and how much via mysqli connections.

My basic work is recode, refactor and support old projects. I migrate from procedural to OOP style and from mysql to mysqli. I need to know how much old requests left from old coders (code is messy and crazy as usual to calculate this in code directly).

Thanks!

Dmytro Zarezenko
  • 10,526
  • 11
  • 62
  • 104
  • 1
    Sounds like you might want to be [*profiling*](http://www.xdebug.org/docs/profiler) your app... Though this introduces serious performance penalties. – deceze Sep 02 '15 at 09:15

2 Answers2

0

mysqli has http://php.net/manual/en/mysqli.get-connection-stats.php
and for any driver you can run show status like 'Com\_%'; query.

I see no point in such numbers though, for the task provided.

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
-1

You can override both methods with override_function and log whatever you need.

Community
  • 1
  • 1
javier_domenech
  • 5,995
  • 6
  • 37
  • 59