← Back to team overview

mysql-proxy-discuss team mailing list archive

Re: Creating an internal admin connection

 

Do you see any harm in making the table a MySQL MEMORY table? I can't do
ORDER BY on the internal analyze-queries.lua results table. Or should I
try and modify the lua so that if I provide an ORDER BY, it sorts the
in-memory table?

 

-Matthew

 

From: Joshua Zhu [mailto:zhuzhaoyuan@xxxxxxxxx] 
Sent: Friday, February 27, 2009 1:29 AM
To: Boehm, Matthew
Cc: Jan Kneschke; mysql-proxy-discuss@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Mysql-proxy-discuss] Creating an internal admin connection

 

Hi Matthew!

Just add a word to Jan's clarification: IMHO, you don't need to worry
about the memory usage of that in-memory table. Maybe you do have
"hundreds-of-thousands of queries" per day, but only the normalized
statements (e.g. "SELECT * FROM `animal` WHERE `id` = ?") would be
stored , so it's not so expensive as you thought. Much less you can
periodicly SELECT the analysis information from histogram.queries, merge
it into your real table, then DELETE it.

P.S. I suggest that you give mysqlsla a try to analyze your slow logs, I
haven't tested it with MySQL 5.1 logs though ;)

Regards,

-- 
Joshua Zhu
http://blog.zhuzhaoyuan.com


Follow ups

References