mysql - Is using rand() in an INSERT statement also slow? -
the mysql rand() function notoriously slow in select statements, true insert statements well? insert new row random number in following way:
insert new_table (field1, field2, randomfield) values ('hello', 'ola', rand());
will rand() function become slow table gets larger , larger?
will rand() function become slow table gets larger , larger?
no. rand() getting slower on big tables when used in conjunction order by
or where
. in example, making one call rand()
not performance problem.
Comments
Post a Comment