[wp-trac] Re: [WordPress Trac] #2621: get_nested_categories() and
friends use a lot of DB queries
WordPress Trac
wp-trac at lists.automattic.com
Sun Apr 2 01:18:20 GMT 2006
#2621: get_nested_categories() and friends use a lot of DB queries
----------------------------+-----------------------------------------------
Id: 2621 | Status: new
Component: Administration | Modified: Sun Apr 2 01:18:20 2006
Severity: normal | Milestone: 2.1
Priority: normal | Version: 2.1
Owner: mdawaffe | Reporter: mdawaffe
----------------------------+-----------------------------------------------
Comment (by mdawaffe):
The advantage of get_all_category_ids is that, with the current cache
implementation, it does the following query the first time it's run and
caches the result in a PHP variable (and on the file system if it can).
{{{SELECT * FROM wp_categories}}}
get_categories(), though much more robust, does no caching. Without
adding caching to gote_categories(), even if we're careful within one
function, we'll still run a SELECT for each function dealing with the
categories table. For example, categories.php run both cat_rows() and
wp_dropdown_cats().
--
Ticket URL: <http://trac.wordpress.org/ticket/2621>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list