Re: Automated SQL checker?
- Date: Thu, 13 Apr 2017 08:38:05 +1000
- From: Ronan McGlue <ronan.mcglue@xxxxxxxxxx>
- Subject: Re: Automated SQL checker?
Enable the slow log on the DB. Any queries which are above the threshold
variable ( |long_query_time|
) will be logged .
Default is 10s, so I assume you'd want to drop this down to 1-2 ( or
less ) for a shopcart type response time?
You can then use mysqldumpslow command to aggregate this file after a
period of time to identify queries which are greater than long_query_time.
This is typically the first step in analyzing inefficient queries ( or
more accurately, queries which are candidates for improvement ) in a
running DB. eg
*|mysqldumpslow -s c -t 5 |*
On 13/04/2017 01:06, SSC_perl wrote:
On Apr 11, 2017, at 1:26 PM, Michael Munger <michael@xxxxxxxxxxxxxxxxxxx> wrote:
Use MySQL workbench.
Thanks, Michael. I played with it some already and it looks like it will give me a lot to work with.
Will it also let me know if field types are wrong for the given information type, or is that asking for too much?