Log Mysql slow query into table
am 30.11.2010 10:41:14 von Cool Cool
--0-1513690419-1291110074=:92513
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hi,
I am trying to log slow queries into both file and table. =0AI h=
ad set as > SET GLOBAL log_output =3D`TABLE,FILE`; But it isnt getting log=
ged =0Ainto tables.
Can I know if I need to create table or am I miss=
ing anything ?
Thanks.
Regards,=0ARam
--0-1513690419-1291110074=:92513--
Re: Log Mysql slow query into table
am 30.11.2010 14:09:15 von Wagner Bianchi
--001636c5bc0f502f3f049644e59c
Content-Type: text/plain; charset=ISO-8859-1
Have a look on it:
mysql> show variables like '%slow%';
+---------------------+------------------------------+
| Variable_name | Value |
+---------------------+------------------------------+
| log_slow_queries | OFF |
| slow_launch_time | 2 |
| slow_query_log | OFF |
| slow_query_log_file | /var/lib/mysql/grey-slow.log |
+---------------------+------------------------------+
4 rows in set (0.05 sec)
mysql> set global slow_query_log = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%slow%';
+---------------------+------------------------------+
| Variable_name | Value |
+---------------------+------------------------------+
| log_slow_queries | ON |
| slow_launch_time | 2 |
| slow_query_log | ON |
| slow_query_log_file | /var/lib/mysql/grey-slow.log |
+---------------------+------------------------------+
4 rows in set (0.06 sec)
one advise is, be aware that guide its slow queries to a tabel will impact
MySQL's performance.
Best regards.
--
WB
Skype: wbianchijr (preferred way to contact me)
2010/11/30 Cool Cool
> Hi,
>
> I am trying to log slow queries into both file and table.
> I had set as > SET GLOBAL log_output =`TABLE,FILE`; But it isnt getting
> logged
> into tables.
>
> Can I know if I need to create table or am I missing anything ?
>
> Thanks.
>
> Regards,
> Ram
>
>
--001636c5bc0f502f3f049644e59c--