|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: Re: Speeding up the DBIby tantarbobus (Hermit) |
| on Jul 14, 2003 at 19:32 UTC ( #274121=note: print w/ replies, xml ) | Need Help?? |
|
Yes it is. DBD::mysql behaves in the same way that DBD::Pg does when it comes to pulling all of the rows from the database server. If you want DBD::mysql to act as if it were using cursors, you can specify mysql_use_rows on the statement handle, and then it will not pull over the whole data set on execute. For DBD::Pg, you can declare a cursor and then execute the fetch in a loop until you have recieved all of the data. Admittedly this coould be done in a cleaner fashion where prepare could take an attribute and if prepare sees that attribute it will declare a cursor and rewrite your statement to use the cursor (which is what Pg::Simple does,IIRC)
In Section
Meditations
|
|
||||||||||||||||||||||||