[wp-trac] [WordPress Trac] #18836: ORDER BY RAND() is slow

WordPress Trac noreply at wordpress.org
Sat Jul 11 11:23:58 UTC 2015


#18836: ORDER BY RAND() is slow
-------------------------------------------------+-------------------------
 Reporter:  scribu                               |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Query                                |  Release
 Severity:  minor                                |     Version:
 Keywords:  needs-unit-tests has-patch needs-    |  Resolution:
  testing                                        |     Focuses:
                                                 |  performance
-------------------------------------------------+-------------------------

Comment (by MisdaX):

 It is indeed difficult. I tried to reduce the impact of the patch as best
 as I can. I tested a vanilla wordpress and a patched wordpress with the
 whole unit test package to ensure that I broke nothing.

 I assumed that there are tests which cover the ordering part of the
 function. No change in the result of the unit tests was a sign for me that
 everything should be ok. Unfortunately I have no idea how I can provide a
 suitable test for a random order functionality :-)

 Independently, it would be nice if someone could provide a performane test
 with a big database.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18836#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list