Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

limit records returned using TOP

Quote Reply
limit records returned using TOP
I have a forum with ~90,000 posts and would like to limit the number of posts that are displayed in the forum view and via the search tool to a more manageable number. I would like to lessen the server load and speed up page loading, and it's obviously unneccesary to display all 90,000 posts to each forum user anyway as no one is going to look through the vast majority of those posts directly. I don't want to delete any posts, but rather only display the most recent X posts or threads. I suppose I'm looking at adding a TOP command to some select statements, but I fear that once i get into it, i'll find that i have to change alot of select statements. Suggestions? Thanks!
Quote Reply
Re: [kevin.palmer] limit records returned using TOP In reply to
Gossamer Forum is already using limits to only display 25 links at a time (by default), so throwing in a TOP wouldn't really affect anything.

Perhaps what you could do instead is set "last 3 months" to be the default setting on the search page (include_search; you could make the quick search at the bottom of the page do the same thing by adding: <input type="hidden" name="search_time" value="3m"> into the search form in include_footer.html.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] limit records returned using TOP In reply to
Thanks for the reply. I guess that's a possibility. But I'd like to limit the number of threads returned to the main forum view as well. Yes, Gossamer Forum only displays 25 threads per page, but it also shows 400+ pages which aren't necessary...no one is going to go back through 400 pages of threads.
Quote Reply
Re: [kevin.palmer] limit records returned using TOP In reply to
Hi,

Gossamer Forum doesn't actually select all 90k messages, only gets a count which is a very fast query. You won't save much in terms of server load/speed by reducing the number of pages available. =)

Cheers,

Alex
--
Gossamer Threads Inc.