I understand the main difference between using Statement and PreparedStatement (PreparedStatements allow passing in parameters). But I read about a subtle difference between the two – namely that PreparedStatements can be quicker than generic Statements, because PreparedStatement SQL is precompiled.
What exactly does being precompiled mean, and why does it make a difference?
A prepared statement performs the following checks: