Support » Plugin: Relevanssi - A Better Search » Huge Relevanssi database table

  • Hi Mikko,

    I use the Relevanssi plugin for quite a long time, and it works just great.
    Anyway, for some reason I see that the db table wp_relevanssi is getting to huge dimentions, and I afraid that it has an effect also on website’s speed since that.

    The wp_relevansii table, as it lists in the phpmyAdmin, has about 900,000 rows and even more, and this table size is about 300MBB, where the db of the whole site is 430MB, which means that the Relevanssi table is taking about 70% from the site’s db size.
    Is there a way to reduce it?

    Some more info:
    * WP version 4.9.8
    * Relevanassi version 4.1.3 (most updated)
    * Relevansi Custom search result snippets – disabled (always was disabled)
    * State of the index:
    7037 documents in the index.
    932567 terms in the index.

    * Indexing options –
    – 5 custom post types,
    – about 19 custom taxonomies
    – comments not indexed
    – custom field not indexed
    – expand shortcodes while indexing is on
    – Minimum word length: 2 (maybe this causing the table to be huge? anyway this site needs to be able to find also for 2 characters searches)

    I’ll be happy for any help for optimizing that table, and check if it causing the site to be slow.

    Thanks
    Maor

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Yeah, it’s huge. It says so right on the Relevanssi plugin front page here: you can expect the table size to be approximately three times the size of your wp_posts table, and in some cases even more.

    Unfortunately there really isn’t a way to reduce it. Adding stopwords will make it slightly smaller, but not much. Indexing those two-character words is bloating up the database, so make sure you list as stopwords all common two-character combinations that you don’t need.

    I’m not a database expert, but having one large table shouldn’t slow down other database functionality: the Relevanssi table is not used except when doing searches, so it shouldn’t make the rest of the site slower.

    It’s rather difficult to do a good search without an index, and indexes are by nature large. The search solutions that don’t include a big index in your database do it by offloading it somewhere else. The cheapest solution is probably the Jetpack search, in general the search solutions tend to be quite expensive – Swiftype for example would cost you at least $104 / month.

    Thread Starter maorb

    (@maorb)

    Hi Mikko,

    Thanks for your detailed reply about this. I know and agree with the principals you mentioned in your reply.

    About the stop words – does any stop word appears as a one row in the database? or may it help to reduce table’s size?

    Plugin Author Mikko Saari

    (@msaari)

    Stop words don’t appear in the database at all, so that’s a way to make the table smaller. Adding one stop word can potentially remove 7000 rows from the table.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Huge Relevanssi database table’ is closed to new replies.