in reply to fastest method to use DBI
First you have to answer the question: do I need all 100000 rows before I do any processing? Or do you want to process each row? In which case you're (probably) better off fetching a row at the time, doing the processing, then fetching the next. Note I say probably - if the processing takes a long time, you are holding resources (perhaps even locks) in the database which may influence other processes accessing the data.
AFAIK, bind variables and fetchrow_arrayref are the fastests way to retrieve data - with bind variables probably the fastest (but I haven't benchmarked it myself, and it may vary between drivers). I never use bind variables, as I don't like its action at a distance, but if fetching was the bottleneck of a time critical program, I'd certainly look into it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: fastest method to use DBI
by dsheroh (Monsignor) on Jul 07, 2009 at 14:28 UTC | |
by perrin (Chancellor) on Jul 07, 2009 at 15:34 UTC | |
by zwon (Abbot) on Jul 07, 2009 at 18:54 UTC | |
by perrin (Chancellor) on Jul 07, 2009 at 19:25 UTC |