I'm not sure I understand the prepared statement regarding speed or efficiency. I read that the prepared statement is compiled on the database server and can be used again and again.
But let's say I have a webpage. He makes one request. The next user brings up the page, the same request, only different parameters for this user.
In the second hit on the web page, a statement was prepared looking at dbms to find out if this particular request exists on the database server? I donβt understand what it means to say that the instruction is compiled and can be executed βover and overβ. Does he not cook it on every page run?
Also, this is not about SQL injection. This part, which I really understand, relates to compilation.
Thanks.
edit: I searched, but I can not find the answer. I just came to this question.
edit: Based on the comments below, given my scenario, I don't see any efficiency. Security yes. The whole compiled thing. Not. Does anyone have a scenario that they can give as an example that meets performance requirements?
source share