mysql-proxy-discuss team mailing list archive
-
mysql-proxy-discuss team
-
Mailing list archive
-
Message #00072
Re: Creating an internal admin connection
Boehm, Matthew wrote:
> Hey Joshua,
>
> Thanks. I saw that script and was going to use it originally but I was
> concerned about memory usage of mysql-proxy if it was suddenly asked to
> start maintaining an in-memory record of the analysis of possibly
> hundreds-of-thousands of queries on a daily basis.
This sounds like
http://mysql.com/products/enterprise/query.html
We use mysql-proxy and script that is based on the analyze-query script
referenced below and dump the created dataset once in a while to our
central repository.
That way we get both:
* reasonable memory usage
* nice statistics across the whole dataset
> I was hoping to turn this into a ‘feature’ we offer to our customers.
> Leave the analysis running all the time and periodically spit out
> reports to our internal customer portal.
Perhaps you just want to integrate with above product.
> MSSQL has some amazing stats that are “always on” and I’m trying to
> implement most of them.
>
>
>
> Another idea I just had; leave the slow_log as it is and basically
> ‘dump’ that table through m-p and let it tokenize into another table.
> That possible? Or would that just be a normal LUA script? (ie: is the
> tokenizer part of m-p or is it pure LUA?)
The tokenizer is a c-library that is wrapper into a lua-module. So you
can use it directly on C-level or in lua, whatever you prefer.
> Hm. Another idea. Continue to use slow_log. Start m-p with a simple
> script that looks for a custom command (‘START SLOW ANALYSIS’, etc)
> which then does a select from slow log, and uses read_result to tokenize
> each row and create the report. May take a while depending on size of
> slow_log but then that could be scripted in a cron job or something.
"mysqldumpslow" does that already, just in pure-perl.
> -Matthew
cheers,
Jan
--
jan: "Gee, Brain^WEric, what'd you wanna do tonight?"
eric: Same thing we do everynight: Take over the HelloWorld!
Follow ups
References