Mysql – How to analyze impact of a query on another queries

MySQLperformance

Suppose I have two tables let's call them values and candlesticks. I can compute candlesticks over values using three different methods:

  • In trigger before inserting new value with insert on duplicate key update
  • Periodically issue insert into candlesticks ... select from values.
  • Using some service written in some language that would periodically poll values, computing updating or adding new candlesticks.

I'd like to analyze how this methods would impact queries to both values and candlesticks. The best thing I came up so far is to write a script that would put new values and another one which would issue two typical queries (one for candlesticks and one for values) and use performance_schema as it described in manual to gather data about queries and plot it.

Which seems like a problem that should be solved already by some tool. Is there a such tool (free) that can monitor some query performance over time? Maybe there are some other approaches to the problem?

Best Answer

Is there a such tool that can monitor some query performance over time?

There are several solutions such as Spotlight, SolorWinds, SQL Monitor (Red Gate).