On 12 Aug 2007, at 12:26, Vangelis Katsikaros wrote:
> In http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
> "profiling" and "profiling_history_size" variables are noted as
> session variables, which is also mentioned in
> http://dev.mysql.com/doc/refman/5.0/en/show-profiles.html
>
> However profiling_history_size can be set from the my.cnf file
> where as
> profiling can't. Also from mysql command line it is possible to do ie
> SET GLOBAL profiling_history_size=10;
>
> So is profiling_history_size session but handled like global or simply
> hasn't been updated in the docs?
The session's history-size is set from the global size when the
session is created. You may think of it as a default value.
> Also I would like to ask if there is a reason for not having
> profiling as global variable.
Yes, it's intentional.
Profiling is expensive, and it should never be left on. This is a
safeguard against our users who don't read the manual.
Furthermore, profiling data is session-specific. Outside of a
session, there's no way to access the profiling data. Thus, it
doesn't make sense to enable profiling from outside, when one can't
access it from outside.
Now, it would be nice to create a way to write "remote" profiling
data to a table. Say, I'm in connection 23 and I want profiling data
on connection 42 (or some expression that describes the session), it
would be nice to turn on profiling and write its results to a
particular table that I name. I invite that feature to be implemented.
- chad
--
Chad Miller, Software Developer chad@stripped
MySQL Inc., www.mysql.com
Orlando, Florida, USA 13-20z, UTC-0400
Office: +1 408 213 6740 sip:6740@stripped
Attachment: [application/pgp-signature] This is a digitally signed message part PGP.sig
| Thread |
|---|
| • profiling question | Vangelis Katsikaros | 12 Aug |
| • Re: profiling question | Chad MILLER | 13 Aug |