Check out useful posts regarding MySQL optimization
How to Backup/Restore/Crate/Drop the MYSQL Data Base through the Command Prompt?
how to optimize the Stored Procedure?
how to avoid the Cursors inside the Stored procedure?
Even we can store the result to file
To run the query directly from the command Prompt:
mysql –u[Username] –p[Password] -e "select * from tbl_emp where emp_id=2" [DataBaseName]
‘-e’ :- execute the queryEven we can store the result to file
mysql –u[Username] –p[Password] -e "select * from tbl_emp where emp_id=2" [DataBaseName] > D:\test.log