I have an application where I need to select certain random values
from a select set. The obvious way to do it is via cursors. That is,
I perform the select, generate the random numbers, then seek the
cursor that position in the set to retrieve the row. The data set is
*way* big and will not fit into memory, so that's not a viable option.
Right now, I'm doing a COUNT() on the dataset, then performing
repetitive "SELECT ... LIMIT N,1" where N is my random number.
Needless to say, this is very inefficient!
Is there some good way to emulate the cursor functionality from the
Perl DBI interface?
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@stripped Rockville, MD +1-301-545-6996
PGP & MIME spoken here http://www.kciLink.com/home/khera/