Editing a forum with a boatload of members..

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/70141?pagenum=1
04 November 2025, 15:08

Topic


bobby131313
Editing a forum with a boatload of members..
26 February 2012, 08:09


I'm cruising up close to 20K members. That list takes what seems an eternity to load when editing forum properties. It takes around thirty seconds to generate the page because of the "Allowed Member List". Has anyone converted this to a text box to add a member instead of pulling the entire list?

 

Replies ...


HuwR
26 February 2012, 13:35


I'm pretty sure there was a MOD for this at some pont, have you tried looking on SnitzBitz ?
I would say however that if it is taking 30 seconds with 20K members then it is the server causing the slowness not the 20K members, we have > 30K and it takes approx 5 secs to open the page
Shaggy
27 February 2012, 05:38


What version of the forum are you running, Bobby? Have a look at this topic and check that the changes mentioned have been made in your code.
bobby131313
28 February 2012, 09:28


Shaggy that code was not there, I added it. It did improve the speed for normal posting but unfortunately not for forum editing. I also did not see anything on Snitzbitz.
weeweeslap
05 October 2012, 17:08


We added something to the query that it would only return the names of those who had at least a post count of 1. Since most of my site members don't post in the forum, that reduced the loading to under a second from over 30 seconds. Unfortunately, I'm no coder so I wouldn't know the first place to find that piece of code bt I hope that idea gets you going.
Carefree
05 October 2012, 18:36


Here you go, Weewee:

"post.asp"
Code:

Look for the following lines (appx 1214-1217):

strSql = "SELECT MEMBER_ID, M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_STATUS = " & 1
strSql = strSql & " ORDER BY M_NAME ASC "

Change them to say:

strSql = "SELECT MEMBER_ID, M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_STATUS = 1 AND M_POSTS > 0"
strSql = strSql & " ORDER BY M_NAME ASC "
bobby131313
05 October 2012, 18:47


Hah! Genius!
Changed...
Code:

		'#################################################################################
'## Allowed User - listbox Code
'#################################################################################
strSql = "SELECT MEMBER_ID, M_NAME, M_POSTS "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_STATUS = " & 1
strSql = strSql & " ORDER BY M_NAME ASC "

To

Code:

		'#################################################################################
'## Allowed User - listbox Code
'#################################################################################
strSql = "SELECT MEMBER_ID, M_NAME, M_POSTS "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_STATUS = 1 AND M_POSTS > 49 "
strSql = strSql & " ORDER BY M_NAME ASC "



Now it only lists members with 50 posts (minimum for special forum access) or more and only takes about 3 seconds.
Thanks!
bobby131313
05 October 2012, 18:48


Dam you Carefree.... Grrr......
smile
Carefree
06 October 2012, 11:47


Any time bigsmile
bobby131313
06 October 2012, 19:48


Carefree, don't you have to add M_POSTS to the select?
Carefree
12 October 2012, 06:12


Code:
		strSql = strSql & " WHERE M_STATUS = 1 AND M_POSTS > 0"
bobby131313
12 October 2012, 15:51


Yeah, but doesn't...
strSql = "SELECT MEMBER_ID, M_NAME "
need to be...
strSql = "SELECT MEMBER_ID, M_NAME, M_POSTS "
Davio
12 October 2012, 16:45


No, bobby. Why do you think it does?
bobby131313
12 October 2012, 18:36


Hmmm... just thought you had to select it from the DB before you could use it.
So if you use it in the "where" part that's good enough?
ruirib
12 October 2012, 18:52


In the SELECT clause you need only to include the columns you want to have in the resulting recordset. You don't need to include a column that you will only use to apply a condition, like in this case, Bobby.
bobby131313
12 October 2012, 21:28


Ahhh.... gotcha. Thanks.
© 2000-2021 Snitz™ Communications