MyBB Community Forums

Full Version: mybb_searchlog grows 3MB each search query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I've noticed that the table mybb_searchlog is using >100 MB and I figured out that it's possible to do a search query without entering a search string. Therefore the table grows up to 3MB each search query, because I got a search result with 25'296 pages. The minimum character check in the setting does not seem to work.

Imagine how big this table will get if someone clicks 100 times on the search button. Here you see the difference before and after doing "one" search query (entering no search string).

[Image: searchlog1hoez9.png] [Image: searchlog2bxfpg.png]

Settings page:

[Image: settingsnkerp.png]

I know that this table is cleaning up itself, but I'm wondering if this might be a bug. I'm using MyBB 1.8.22 (will update soon), PHP Version 7.4.32, 10.3-MariaDB.

PS: In this forum (https://community.mybb.com/search.php) it is also possible to click on "Search" without entering a search string, but here I get a blank page (timeout?). So there is no minimum character check enabled here or it doesn't work anymore.

Best regards
Daniel
(2022-11-09, 02:31 PM)RaymanXY Wrote: [ -> ]Therefore the table grows up to 3MB each search query, because I got a search result with 25'296 pages.
That's the reason why there is setting to limit the number of search results.
Yes, this would solve the problem, but why is the minimum character check not working?
Hi, sorry for my poor English but I think I understand what you are writing.
Your question is because the search table increases in size depending on the users that search that string, then the weight of the table increases?

Are you worried that if the table increases too much the mybb software may lose capacity when searching that string?

My friend I am not an expert on the subject but if I manage several websites with mybb, one of them has approximately 40 Gigas in database, the stats in the administration panel show the results well, the queries, I have never been down the web and manages an average number of users who enter to make queries ... I have never had problems with mybb, the tables go perfectly .

It is like my contribution, with a database of approximately 40 gigabytes I have never had any problems with the search table.

Test wit a search, thats result of searc string
Quote: Generated in 251 ms (33.90% PHP / 66.10% MySQL)
SQL Queries: 17 / Server Load: 7.76



I hope this information will help you to solve your problem.

Good day