1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 XF_Saerch Too Big: 2.7 GB!

Discussion in 'Troubleshooting and Problems' started by Recep Baltaş, Jul 7, 2014.

  1. Recep Baltaş

    Recep Baltaş Well-Known Member

    Is it normal for the search table to be too big ? It is the biggest table. Even Search Index is 400 MB. What is wrong ?

    I have Elasticsearch and Xenforo Advanced Search installed BTW.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Recep Baltaş likes this.
  3. Recep Baltaş

    Recep Baltaş Well-Known Member

    I am optimizing all tables ATM. After that, I will truncate it. Thanks.
     
  4. Recep Baltaş

    Recep Baltaş Well-Known Member

    The big one is not xf_search_index. It is xf_search.

    xf_search - 2.7 GiB
    xf_search_index - 479.8 MiB

    Can I truncate the other one too ?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    That table contains data of actual searches carried out, including new posts being fetched.

    What is the date of the oldest record?
     
  6. Recep Baltaş

    Recep Baltaş Well-Known Member

    It is now 3.4 GB.

    The oldest date can be March 2014, when we started using Xenforo, swtiching from vBulletin.

    Search result value was 20.000, now I have set it to 200.

    How can I see the oldest entry? The table is 975 pages long.
     
    Last edited: Jul 7, 2014
  7. Mike

    Mike XenForo Developer Staff Member

    If you were storing 20000 search results, that could certainly cause that table to be large. It stores search results for a period of time (and this includes "find new" hits). The table will have rows cleaned up over time. You can confirm this is working correctly if you look for the smallest search ID over the course of a few days.
     
  8. Recep Baltaş

    Recep Baltaş Well-Known Member

    It is still 3.4 GB.
     
  9. Mike

    Mike XenForo Developer Staff Member

    Run the daily cleanup cron to trim it to only searches in the last day. If you have a lot of searches (or activities that create searches), that table will contain a fair amount of data though.
     
  10. Recep Baltaş

    Recep Baltaş Well-Known Member

    I did. Still 3.4 GB. Can I truncate that table ? Why do I need it ? I don't need the search log.
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    Yes you can truncate it, but as already pointed out, if you have a lot of searches, it will increase in size again.
     
  12. Recep Baltaş

    Recep Baltaş Well-Known Member

    Thanks a lot. I have narroved down search results and truncated the tables.
     

Share This Page