On 2006-11-06 14:37:20 -0000, [EMAIL PROTECTED] wrote:
> On 6 Nov 2006 at 14:12, Also Sprach Peter J. Holzer:
> > On 2006-11-06 11:58:44 -0000, [EMAIL PROTECTED] wrote:
> > > I'm currently, for speed, using execute, bind_columns, fetch. 
[...]
> > > So, given that speed is paramount, should I continue with this 
> > > method or should I switch to fetch hashref?
> > 
> > This is a question only you yourself answer.
> > 
> > Rewrite your code to use hashref.
> > 
> > *Measure* how much slower it is.
> 
> I did that just after sending my email. Bizarrely enough, the hashref _is_ 
> faster by 
> nearly a second (3.2 secs to nearly 2.2). I can't believe there should be 
> that much 
> difference.

I'm not very surprised. I haven't done any statistics, but I get the
feeling that when somebody says "I am doing A instead of B, because A
is faster" the there is a chance of more than 50% that B is actually
faster.


> I was just wondering if anyone had checked it before and if there was
> a cut off point where the number of vars makes the difference
> negligible.

I suspect that depends on the the perl version, the DBI version, the
processor, maybe the DBD driver and almost certainly on the data. So any
measurements would probably have been only of limited use.

        hp


-- 
   _  | Peter J. Holzer    | If I wanted to be "academically correct",
|_|_) | Sysadmin WSR       | I'd be programming in Java.
| |   | [EMAIL PROTECTED]      | I don't, and I'm not.
__/   | http://www.hjp.at/ |   -- Jesse Erlbaum on dbi-users

Attachment: pgpjcCMPmLS6M.pgp
Description: PGP signature

Reply via email to