Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: Re: Re: Re: Re: Re: mod_perl was hosed by a bind variable

by tantarbobus (Hermit)
on Feb 02, 2004 at 05:30 UTC ( #325795=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: Re: Re: mod_perl was hosed by a bind variable
in thread mod_perl was hosed by a bind variable

I'll leave it at this:

We are looking at it from two different points of view. You are more interested in pedagogy even at the expense of accuracy whereas I am in favour of accuracy even if it serves to confuse slightly. Although I think that a good instructor can do both (think back to your days in math where the proffessor, explaining a proof, does some "handwaving" over the harder parts that require skills yet to be attained)

FYI, mysql should have no problem accepting the 100,000 char string since the string that DBD::mysql sends to the database is basically just the prepared sql statement with all bind params filled in. So $db->do("This is my ?",{},'x'100_000) becomes something akin to "this is my '@{'x'x100_000}'".

The truth is that the inflection point where prepare() becomes faster than prepare_cached() is much lower that at x=100_000 (it looks to be somewhere around x=6*1024 of data). I just pulled x=100_000 off the top of my head because hash lookup performance tends to go down as the size of the string increases and at 100,000 I figured that the hash lookup would take more cpu than the work mysql did + object creation overhead, and since I only needed 1 counterexample;therefore, I did not dig any further...

Oh well...

  • Comment on Re: Re: Re: Re: Re: Re: Re: Re: mod_perl was hosed by a bind variable

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://325795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2019-10-24 04:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?