I think I've narrowed it down to the following query...

USE THIS QUERY TO GET THE POST ID...

SQL Query
select POST_ID from ubbt_POSTS where TOPIC_ID in
(
	select TOPIC_ID from ubbt_TOPICS where FORUM_ID in (
		select FORUM_ID from 
		ubbt_FORUMS where FORUM_IS_ACTIVE = 1
		and FORUM_ID not in (56)
	)
)
LIMIT 250000,1

Can anyone pick any holes in this, or does it look like you think it should?

Note - FORUM_ID 56 is a moderators area, and I don't want to count these posts.

Note 2 - Yeah, it could do with some optimisation - its not a performant query, but it's only going to be run once or twice. smile

Last edited by ZombieSheep; 03/09/2009 4:01 PM.