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

The xf_search_index table can be truncated if using XFES

Discussion in 'Enhanced Search Support' started by Brogan, Jan 18, 2012.

  1. Brogan

    Brogan XenForo Moderator Staff Member

    For those of you who aren't aware, if you're using XFES you can truncate the xf_search_index table, as it is no longer used.

    On a large site, that will reduce the DB size by a considerable amount, (potentially) resulting in less server space being utilised, quicker backups, etc.

    TRUNCATE 'xf_search_index';
    TRUNCATE TABLE xf_search_index;
    DBA and GeeksChat like this.
  2. DBA

    DBA Well-Known Member

    Noob question, where's the index now stored?

    Also what SQL command do I use to truncate this table?
  3. Anthony Parsons

    Anthony Parsons Well-Known Member

    I believe it would be:

    TRUNCATE 'xf_search_index';
  4. DBA

    DBA Well-Known Member

    I think you forgot the "TABLE".

    This ended up working for me:
    TRUNCATE TABLE xf_search_index;
    Anthony Parsons likes this.
  5. Slavik

    Slavik XenForo Moderator Staff Member

    The index is stored in the location set up on elasticsearch on your server, not in mysql:)
    DBA likes this.
  6. DBA

    DBA Well-Known Member

    Assumed as much, thanks! (y)

    I dig being able to search down to single characters, which is one of the main reasons I'm using it (my niche has a lot of 2-3 letter acronyms).
  7. Anthony Parsons

    Anthony Parsons Well-Known Member

    Sorry... that was through phpmyadmin. Yes, it would need table through SSH.
  8. Anthony Parsons

    Anthony Parsons Well-Known Member

    My database is now 500Mb lighter... thanks Brogan for that tidbit.
    GeeksChat likes this.
  9. craigiri

    craigiri Well-Known Member

    Just got rid of 1.3 Gig...that should help the RAM a bit......
    Anthony Parsons likes this.
  10. MattW

    MattW Well-Known Member

    Just got rid of 15omb from my database by truncating that table (y)

Share This Page