Hello everyone. I want to copy profiling data to a table I create in MySql. I want the table to contain the exact data that I get from the command SHOW PROFILES;
For example, if I have this:
mysql> show profiles;
+----------+------------+--------------------------------+
| Query_ID | Duration | Query |
+----------+------------+--------------------------------+
| 16 | 0.00059700 | select * from imprumuturi |
| 17 | 0.00042050 | select * from imprumuturi |
| 18 | 0.00042000 | select * from imprumuturi |
| 19 | 0.00042950 | select * from imprumuturi |
| 20 | 0.00048050 | select * from imprumuturi |
+----------+------------+--------------------------------+
5 rows in set (0.00 sec)
I will create a table that has 3 columns (queryid,duration and query), and I need a command that will copy those 5 rows from "SHOW PROFILES;" to my table.
insert into table (show profiles); does not work
I need it to be done in MySql alone, no other tools/patches.