I know this is an old topic, but I come across this same issue. By running my simple βtestβ and reading what others wrote there, I came to the conclusion that this is not an exact science, and although you should strive to write high-quality, easy code, it makes no sense to spend too much time at the beginning of the project.
My suggestion is to collect data by running the code (in beta?) For a while, and then start optimizing.
In my simple testing (only tested runtime) I have results ranging from 5% to 50%. I run both parameters in the same script, but when I run fetch +, at first it is faster than fetchall and vice versa. (I know that I had to run them one and a couple of hundred times to get the median and average, and then compare, but, as I said at the beginning, I came to the conclusion that in my case it is too early to start doing it.)
StrayObject May 2 '12 at 23:43 2012-05-02 23:43
source share