I use a mysql DB. I have some process to update or select rows on the biggest table of this DB. It is not so big now, but it will be. I know getting random rows could be complex or time consuming on big table on Mysql. I think about to add a column to store a random number (0.1, 0.2,... 0.9) whe' create a new records. When I need to get a random records, I will generate a random number and select all the rows with the same number.
Is it a good idea to handle random in mysql? I could regenerate the random column sometimes to get some more randomness.
Aucun commentaire:
Enregistrer un commentaire