php mysql shuffle output speed -


i have mysql query returns 20 results table of 110,000,000. shuffle these before echoing them out using php.

is faster use

order rand() 

or

shuffle array in php somehow?

depending on amount of results you're pulling mysql, order rand() faster.

if you're returning 20 say, performance differences negligible.

you test out , see better you, shuffle array in php use shuffle().


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -