• Resolved fantasysixpack


    Hi. I have an issue where whenever somebody searches my site the query takes over 100 seconds to complete. There is a lengthy REGEXP check included in the WHERE clause of the SQL Statement.

    REGEXP ‘\\[table id=([“\’]?)(21|22|23|24|25|26|29|30|32|35|36|37|38|39|40|41|42|43|44|45|46|55|56|57|58|94|95|97|99|101|104|105|107|108|111|117|132|141|150|167|176|187|206|262|264|265|267|268|272|275|277|278|286|290|291|292|296|298|299|302|308|309|314|316|317|320|322|323|326|328|333|345|350|351|361|362|366|372|378|379|383|384|388|389|395|396|397|398|406|408|409|413|415|419|421|425|427|428|430|432|436|469|488|493|498|505|506|514|520|521|525|530|535|540|541|546|552|561|564|569|574|575|578|584|591|594|597|598|599|600|604|609|610|615|629|630|631|632|633|635|636|637|638|639|643|644|645|646|647|648|651|652|653|654|655|657|663|664|665|666|667|668|669|673|674|675|676|677|679|680|681|682|684|685|686|687|688|692|693|694|695|696|697|698|701|702|703|704|712|713|714|715|719|720|721|722|723|730|731|732|733|734|735|737|743|744|745|746|748|750|751|755|759|760|764|765|766|767|768|769|772|774|775|776|778|779|780|781|782|794|795|797|800|802|805|806|807|808|809|810|811|812|813|814|815|816|818|819|820|821|840|842|877|880|885|886|887|888|893|897|898|901|902|910|914|938|944|946|947|952|953|970|973|974|976|981|990|1178|1227|1228|1229|1230|1241|1242|1247|1255|1258|1259|1260|1271|1279|1285|1286|1304|1311|1312|1389|1413|1427|1483|1484|1496|1539|1540|1541|1582|1583|1584|1585|1586|1587|1588|1589|1591|1592|1593|1594|1595|1596|1598|1599|1734|1736|1751|1752|1754|1772|1793|1814|1848|1894|1904|1926|1943|1952|1965|1969|1988|2027|2062|2082|2132|2141|2244|2252|2261|2265|2267|2268|2271|2272|2273|2276|2277|2281|2285|2296|2301|2304|2314|2316|2320|2387|2463|2464|2474|2488|2490|2527|2541|2542|2551|2556|2561|2563|2585|2589|2590|2591|2598|2617)([\]”\’ /])’)))

    This goes away when I disable Tablepress. I’m not sure how or why this happening but its also causing issues with my hosting site, they are saying I’m using too many resources. Any idea how I can remove this check in my search functionality?

    The page I need help with: [log in to see the link]

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



    Thanks for your post and sorry for the trouble!

    Indeed, this is being added by TablePress, to allow for searching inside of tables.

    To prevent this, you could download, install, and activate the TablePress Extension from https://tablepress.org/downloads/extensions/tablepress-turn-off-wp-search-integration.zip as a new plugin on your site.


    Thread Starter fantasysixpack


    Thank you for the quick response. That indeed did correct my issue.

    Might I suggest that you add this functionality as an option to turn off/on in the default product.

    I also wonder if there is a way to make the SQL code more efficient. I for one have over 2000 table so that code is not going to work.


    Plugin Author TobiasBg



    good to hear that this helps!

    Yes, indeed, for very many tables, this approach is not ideal. However, the issue only happens with search terms that are found in very many tables (so likely short words like “and” and similar). Unfortunately, I haven’t yet found a good way around this problem.

    Regarding a setting: I’m a fan of the WordPress paradigm “Decisions. Not options.” which is why I’m not planning to a setting for this. Most users will never be bothered with this problem, so adding a setting will just create confusion.

    Best wishes,

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.