Charles Mills said:
>
> Michael Neumann wrote:
> (...)
>> Well, I think Ruby/DBI is not the fastest. It parses (and splits)
> each
>> SQL statement, then joins it back into a string, even if you don't
> use
>> '?' parameter markers. This should be delayed and omitted if no
>> parameters were given. Not sure whether this is the reason for the
> slowness.
>>
>
> This may be a dumb question, but why does ruby/dbi do that?  For
> databases that don't support precompiled statements and binding
> parameters?

Its been a _long_ time since I have looked at DBI/DBD code, but if I
recall correctly, although the bind operation is provided by the DBI
library, the actually binding of values is performed in the database
specific DBD portion of the library.

If the database handles prepared statements and binding of "?" parameters,
then the DBD does not need to parse the SQL statements.

However, if the database does not offer that service, then the DBD can use
bind (in the BasicBind module) to emulate it.

Like I mentioned, its been a long time.  Things may have changed since I
last looked at it (or my memory is faulty).

-- 
-- Jim Weirich