PDO - prepared statements?

Second one should be faster because you don't call not needed statements. The idea of prepared statements is that you must prepare it once. But the best way to find out is profiling.

Your second function is definitely a lot faster, especially when it is executed very often. Because that is the main reason why prepared statements were invented: your SQL server has to parse and optimize your query only once. But in your first solution you would not even need prepared statements.

So in my opinion a profiling test is only needed to find out how much faster the second one is and not to find out wether it is faster.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions