in reply to Fast Building of SQL Statements

You're optimizing the wrong thing. Try using prepare_cached instead of prepare. And try using Class::DBI. I resisted for a long time too, but it really is awfully convenient.

Replies are listed 'Best First'.
Re: Re: Fast Building of SQL Statements
by hardburn (Abbot) on Aug 27, 2003 at 17:34 UTC

    I almost always do use prepare_cached (decided against it for the example above), but that won't speed up the initial generation of SQL. Also, its not like converting map to x is obfu. I actually think its slightly cleaner, and gets bonus points for being faster.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated