| Well a lot of that depends on the db you are using. Just by looking at whatever this is, it doesn't look like your database uses SQL, because if it did, you could just pull the rows out of your table randomly using SQL rather than actually change the physical state of your database or use some SQL statement to randomize your rows in the db...
otherwise, that seems like a fine operation. Its going to take you O(n) to create the randomness and then O(sort_method) to sort the data. Just make sure your randomizer gets a different seed for its random number generation... if that's even a problem. |