Re: [CDBI] Make CDBI go fast

Oliver Jeeves <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Perrin Harkins wrote:
>> * A bulk insert method
>> * A bulk delete method
>>
>> Calling ->insert over and over again is inefficient.  Having to load
>> an object only to delete it is even worse.  Bulk insert and delete
>> methods would be handy.
>>
>> For insert the syntax it could be as simple as...
>>
>>     Class->bulk_insert({ foo => 42 }, { foo => 23 }, { foo => 99 });
> 
> Bulk delete is covered by the other tools mentioned above, but they
> don't support any kind of bulk insert that I'm aware of.  To make bulk
> inserts really fast, you have to use database specific extensions,
> like MySQL's multi-row insert statement.

DBIx::Class has a populate method, which inserts multiple rows.

It doesn't appear to take advantage of any DB specific features to do
so; it just does multiple inserts. If the documentation is anything to
go by.

_______________________________________________
ClassDBI mailing list
ClassDBI-Ra3b/[email protected]
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF1CdRSbWXajvTQ+URAjXQAJ4483FFJvqIjInLuvmHo9ZhUiSmMACggg47
TzInP2hoeG8/x5RsMsw2gkY=
=CtL3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.