Pergunta de entrevista da empresa WebDirekt

2) what do you mean by jdbc prepared statement compiled once and executed multiple times?

Resposta da entrevista

Sigiloso

13 de nov. de 2018

When we fire a query to be executed from a relational database it goes through following steps 1 parsing of SQL query 2 compilation of SQL query 3 planning and optimisation of data acquisition path 4. Execute the optimised query and return the resulted data When we use statement it goes through all the 4 steps but with prepared statement first three steps are executed when we create the prepared statement so execution of query takes less time as compared to statement.