NTLDR, last idea was the one I was about to suggest, this works much better for us with large forums and high member turn over.
only you got a few typos in that one
PHP Code:
$members = $DB_site->query_first("SELECT COUNT(*) AS users, MAX(userid) AS max FROM " . TABLE_PREFIX . "user WHERE posts >= X AND lastactivity >= ".(TIMENOW - (60 * 60 * 24 * 7))."");
*thud*
from 5000 members to 1000, boy do i feel hollow.