in reply to
Re: DBI do vs prepare
in thread DBI do vs prepare
Not a clue as to why, but I agree with chromatic about your benchmark. In general whether prepare is worth doing depends on what you are talking to. The logic is that some databases have a very heavy overhead for setting up a query, which is what prepare does. So, for repetitive queries you suffer the pain once only. However, this isn't true for all databases, and you may only benefit if you have a lot of repetitive queries to work on.
To progress you need a much purer benchmark to test exactly what you plan to do in the real world. This should be on of the last things you do in the course of development. This avoids the curse of Premature optimization!
!-- Node text goes above. Div tags should contain sig only -->