I am developing java applications and they all communicate with MySQL database server (getting some data, writing some data etc). In my java code i am executing statements and prepared statements to do it. I want to optimize my applications and get better execution times.
I want to know more about stored-procedures. I want to know the difference between statements, prepared-statement and stored procedures and their advantages and disadvantages, when is better to use either of them.