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

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -