note
targetsmart
<i>is it the right way to get the fastest fetch?</i><br>
I don't know, you have run it and give some statistics on the time taken, memory consumption of the perl program, etc.<p>
<i>It would be great help if get an expert comment on the code</i><br>
I am not a database expert, but IMHO using the database query's OFFSET AND LIMIT is the best way to fetch huge number of records, it is will take only minimum memory(depending on the offset and limit values), and effective values for limit will enable you to fetch all records in a optimum number of fetch cycles.
<p>
<div class="pmsig"><div class="pmsig-520366">
<hr>
Vivek
<br>
-- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.
</div></div>
777737
777739