Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 05:39 am EST
Geeklog Forums
Search Result Limits
Anonymous
Anonymous
Is there a way to limit the number of results returned from a search? For example, when I search for "geek" on this site, I get back:
Fatal error: Maximum execution time of 30 seconds exceeded in /usr/home/geeklog/geeklog/system/classes/template.class.php on line 496
It appears that the request timed out because there were too many results to process and display. Is there any fix for this?
7
8
Quote
Status: offline
rawdata
Forum User
Full Member
Registered: 02/17/03
Posts: 236
My guess is the timeout problem is caused by the way tables are being joined or duplicative results are being returned or both. Joining tables has a multiplicative effect. For example, if you have a table with 10 fields x 100 rows and join it with 10 fields x 100 rows, the dimension becomes 100 x 10,000. If you join another, it gets multiplied again and so on. Depending on the sql call, you can also compound the problem with duplicative results. Geeklog's site has less than 11,500 items to search. This total is nothing for MySQL to handle which leads me to believe one or both of these areas are the problem.
If it helps any, Tony is reworking the search code. Hopefully, he finds and fixes the problem. In the meantime, you can limit the results by narrowing your search criteria (ie select a specific date range, author, or a topic). The timeout seems to be only occurring when someone selects "All". You can always go into search.php and add a limit to the sql calls. If it's a join and/or duplicative problem though, it may only have a temporary effect until you add enough more new info to hit it again.
9
11
Quote
All times are EST. The time is now 05:39 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content