[wp-hackers] Re: [ slow queries in 1.2

Rob Mientjes robmientjes at gmail.com
Thu Nov 18 18:42:56 UTC 2004


I believe the categories page will be paginated. Not sure though, as I
use 1.3a3, which does do that.

On Thu, 18 Nov 2004 19:18:52 +0100, John Sinteur <john at sinteur.com> wrote:
> 
> On Nov 18, 2004, at 5:21 PM, John Sinteur wrote:
> 
> > I've been keeping mysql running with the 'log-slow-queries' option,
> > and one query stands out:
> >
> > # Time: 39  Lock_time: 2  Rows_sent: 6605  Rows_examined: 6626
> > SELECT DISTINCT
> >         ID, category_id, cat_name, category_nicename,
> > category_description, category_parent
> >         FROM wp_categories, wp_post2cat, wp_posts
> >         WHERE category_id = cat_ID AND post_id = ID AND post_id IN
> > (8229,8228,8225,8220,8215,8210,8208,8203,8199,8197,8194,8193,8192,8189,
> > 8187,8186,8184,8180,8179,8178,8172,8163,8166,8161,8157,8155,8153,8151,8
> > 150,8149,8147,8146,8145,8144,8143,8139,8138,8136,8133,8132,8129,8126,81
> > 25,8124,8119,8115,8113,8110,8109,8105,8104,8103,8101,8094,8091,8089,808
> > 8,8087,8083,8081,8079,8077,8073,8072,8071,8068,8067,8065,8064,8063,8060
> > ,8059,8058,8057,8056,8054,8052,8048,8044,8043,8041,8038... insane long
> > list of ID's)
> 
> All-right  - I've figured it out. It's simply a request for:
> 
>   /index.php?cat=1
> 
> where category 1 has a lot of posts.
> 
> I would like to suggest a new option in the admin-pages where the blog
> owner can set a limit on the number of posts returned when somebody
> wants all posts in a category. That way wordpress will never try to
> build a page with thousands of entries on it.
> 
> Is it okay if I write this and submit a diff on version 1.2?
> 
> -John
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
Cheers,
Rob.
» http://www.zooibaai.nl/b/



More information about the hackers mailing list