Page 1 of 1

Reading agent_log table for my own report

PostPosted: Thu Jan 12, 2017 5:56 pm
by macaruchi
Hi!
I have created a report to read each 10sec from agent_log for stats , this report is in a webpage for my customer, now I am feeling a delay in AGC Interface - system delay, now I know Maria lock when I do a SELECT to this table so keeping selecting from this table can be the cause of this delay ?

Any ideas ?

TIA

Re: Reading agent_log table for my own report

PostPosted: Thu Jan 12, 2017 6:22 pm
by mflorell
Yes, that can cause a delay. I would recommend setting up a slave database server to run your report queries from.

Re: Reading agent_log table for my own report

PostPosted: Thu Jan 12, 2017 9:58 pm
by macaruchi
I can use the same server into another database and use this DB just for reports ? It doenst matter has 2 DB in the same server ?

Re: Reading agent_log table for my own report

PostPosted: Sat Jan 14, 2017 9:46 pm
by williamconley
macaruchi wrote:I can use the same server into another database and use this DB just for reports ? It doenst matter has 2 DB in the same server ?

If you know how, yes.

We've also set up systems that merely copy specific tables into a new DB at intervals to avoid the overhead of replication. If you've ever had a DB lose replication in the middle of a workday, and automatically try to pull a full data set to rebuild the replication link, you'll understand the concept. lol

It's also useful to archive the original tables to avoid huge data sets as well as indexing the requested data for speed of retrieval.