Re: str_replace does not like empty quotes [message #186294 is a reply to message #186283] |
Mon, 23 June 2014 06:33 |
Geoff Muldoon
Messages: 19 Registered: July 2011
Karma:
|
Junior Member |
|
|
jstucklex(at)attglobal(dot)net says...
>
> On 6/22/2014 7:20 PM, Geoff Muldoon wrote:
>> jstucklex(at)attglobal(dot)net says...
>> Hmm, I've never really found any signifcant down-side to using bind
>> variables if they are used corrctly, so I'd appreciate any links you
>> might have.
> Performance, for one. Bound values require at least one extra call to
> the libraries (for the PREPARE).
> The extra processing can be excessive in a busy site. Of course, if
> you're only getting 100 hits/day, it's not a problem.
Yes, the first usage of a prepared statement will always require that
extra call, and if it is a query that is unlikely to be run again before
it is flushed from the cache, it will require this call again each time.
However, *particularly if it IS a busy site* and it is a query that is
likely to be executed with a very high regularity (e.g.: "select <fixed
list of order details columns> from order_details_table where order_id =
:<bound variable>") then the benefit of SQL execution plan caching and
soft instead of hard parsing will usually *massively* outweigh that
possible initial overhead.
High-volume sites are MORE likely than toy ones to benefit from bind
variables.
GM
|
|
|