MySQL user's Conference

Gervase Markham gerv at
Sat Apr 26 10:43:44 UTC 2003

> Perl DBI was built for speed and is pretty efficient, but you have to 
> know how to use it right.  For speed:
>     * use prepare() (doesn't work until MySQL 4.1, but you should use it
>       in preparation)
>     * use prepare() and execute() in speed-critical loops instead of do()
>     * select as reference, especially if columns increase
>     * try fetchall_arrayref to see if it's faster

At first glance, this seems to contradict some advice bbaetz gave me 
about not using fetchall at all. What's the story there?


More information about the developers mailing list