[wp-hackers] get_userdata and _fill_user causing huge number of database queries

Simon B piemanek at gmail.com
Wed Mar 3 21:13:21 UTC 2010


I've made a site for a member organisation with (currently) 50 users, each
of whom has one post (a kind of profile post).

When monitoring the site I noticed that a lot more database queries than I
expected were being made. On investigation it turns out that for every post
retrieved, the following two db queries are made: get_userdata and
_fill_user. The first is on the users table, the second on usermeta.

This means that where I was expecting one query there are in fact 101! When
they get more members things are going to get very painful indeed...

Is there any way I can hook into an action somewhere to stop these two
queries from happening, as I have no use whatsoever for the data they're
returning?

Cheers
Simon


More information about the wp-hackers mailing list