Hi! >>>>> "Sergei" == Sergei Golubchik <[email protected]> writes:
Sergei> Hi, Eric! Sergei> On Aug 25, Eric Bergen wrote: >> > Why wouldn't you introduce a persistent session query counter? >> > Like, put it in thd, increment on every query, and show this number >> > in profiling and userstat. >> >> I did that. It functions fine but it means that someone enabling >> profiling mid way through a session won't start with profile id 1 like >> they used to. Sergei> I think that's fine. I agree. After all, 'show processlist' also gives you a unique global id that is incrementing from the time of server start and not since the start of your session. I am still a bit confused why the 'Id' can't be same we use in show processlist. Having two id's will be confusing for anyone doing: 'show processlist' 'show profiles' 'show query table_statistics' Why not have all of these the same ? (Yes, I know that we talked about this, but if we add this to MariaDB we need to at least document, with a good reason, why these are different). >> > Indeed, both profiling and userstat need to keep the list of >> > queries. It would make sense to have internal query history API, >> > something like: >> > >> > enable_query_history() - can be called by profiling or userstat >> > disable_query_history() >> > get_query_str(id) >> > get_query_count() >> > >> If everyone is ok with the profile id issue I highlighted above and >> having this change impact both profiling and table statistics I can go >> ahead and implement it. Please go ahead and do it and send an email to maria-developers@ when you want us to review it! Regards, Monty _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp

