orderby=rand server resources question

4 views
Skip to first unread message

Toby Cryns

unread,
Aug 8, 2015, 9:17:22 AM8/8/15
to Minneapolis St. Paul WordPress User Group
Does anyone know if using the "orderby=rand" argument in a WP query via the new Rest API (https://wordpress.org/plugins/json-rest-api/) is less taxing on server resources than by calling it via php in a theme or plugin?

Thanks!
Toby

Nick Ciske

unread,
Aug 8, 2015, 12:26:56 PM8/8/15
to mpls-stpau...@googlegroups.com
It gets passed to WP_Query as an argument so it would be the same level of load DB wise.

So either select all (cacheable) and do the randomization on the client side, or you'd need a custom endpoint that does the randomization server side (same idea, less data over the wire). 

_______________________ 
Nick Ciske
VP Web Engineering
@nciske


Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages