Orderby Custom Field and Performance in WordPress -
i have several different wp_query within index page of sorts, queried category.
$args1 = array( 'post_type' => 'page', 'cat' => 3, 'meta_key' => 'indextitle', orderby => 'meta_value', 'order' => 'asc' ); $query1 = new wp_query($args1); as can see, sorting query meta key "indextitle". know using custom fields queries decreases performance quite bit, wondering if knew if there similar performance nail when take order query custom fields. in other words, orderby parameter have impact on performance in big way?
short answer: no
it not have big impact on performance. wp_query object constructs mysql queries , not of sorting itself, means performance decrease caused mysql , not wordpress.
if table(s) you're quering extremly large, might worth mysql database/table optimization using techniques such table indexing.
wordpress custom-fields custom-taxonomy
No comments:
Post a Comment