Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7160021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:19:44+00:00 2026-05-28T13:19:44+00:00

I faced with MySql query which takes too much CPU and time to execute

  • 0

I faced with MySql query which takes too much CPU and time to execute

The query is looks like

Select * from table where table.a LIKE %a% OR table.a LIKE %b% OR table.a LIKE %c%

We do need this LIKE statements, due to business requirements (we need to look for any equalities).

So how it is possible to speed it up?
Is there any caches we could use? Is there some NoSql solutions would be good?
I suppose that even if we load all table to memory we still will have poor performance due to full-text scans because of these LIKEs.

Will it be better if we use regexp there?
What approaches are typically good for such text-search purposes?
If we switch to NoSql, will it be better?
What particular product can help us?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:19:45+00:00Added an answer on May 28, 2026 at 1:19 pm

    The problem is that wildcarded searches can’t make very efficient use of indexes, hence your performance issues. RegEx will be no better, in fact it will probably be worse.

    I’d suggest setting up a fulltext index on that field if the reason you are using wildcards is to pick out individual words from a textual field. It will allow you to do searches without wildcards for individual words. However, it won’t help much if you are searching on parts of words like your example %b%.

    Switching to NoSQL because of a few queries performing poorly seems like extreme overkill, and I doubt it would help enough to justify it for that reason alone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a quick csv from a mysql table with a query like: select
I have a query that looks like this: select id , int1 , int2
I am fetching some data from MySQL which I print into a table. I
When I Try to built Query from another Query in php code I Faced
When my Application face a long-time process, i.e fetch a query (SELECT a, b,
this query works fine using the php_mssql driver: INSERT INTO Table(columnName) VALUES ('text'); SELECT
I want to combine the following queries into a single query: SELECT val FROM
I'm exporting some data from MySQL which can be selected through checkboxes on a
Faced with the challenge of a new application with which you had free reign
I faced a problem while using threading for the first time, In an SWT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.