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

  • Home
  • SEARCH
  • 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 4105866
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:18:11+00:00 2026-05-20T21:18:11+00:00

Current Query: SELECT * FROM ‘fnx_sports’ WHERE (Title LIKE ‘%base%’ OR Title LIKE ‘%ball%’)

  • 0

Current Query:

SELECT * FROM 'fnx_sports' WHERE (Title LIKE '%base%' OR Title LIKE '%ball%')

The above query will take 0.0300 seconds approx.

Faster Query:

SELECT * FROM 'fnx_sports' WHERE (Title LIKE 'base%' OR Title LIKE 'ball%')

The above query will take 0.0010 seconds approx.

The problem:

I need to the results from the first query, as the second (faster) query does not have the wildcard at the start (which allows for indexes to be used).

What options do I have?

One option is to have a separate table which contains all the keywords from the Title field, however this is not appropriate as I am looking to search on a character by character basis, not on a keyword by keyword basis.

For example, the following query should also work:

SELECT * FROM 'fnx_sports' WHERE (Title LIKE 'b%' OR Title LIKE 'b%' OR TitleReversed LIKE 'b%' OR TitleReversed LIKE 'b%')

I’m not sure if this is the most efficient way to do this is. I don’t want to modify my table and code structure without confirming the best method. I appreciate any advice!

Note: Cannot use full-text since I have a table which gets quite large and needs constant inserts and selects, therefore I use INNODB instead of MYISAM which is required to use Full Text searches.

  • 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-20T21:18:11+00:00Added an answer on May 20, 2026 at 9:18 pm

    Maybe look at Lucene and Sphinx.

    See:

    How much more performant is Postgres than MYSQL on fulltext search?

    (especially peufeu’s answer)

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

Sidebar

Related Questions

My current query looks like this: SELECT * FROM fiberbox f WHERE f.fiberBox LIKE
My current query reads: SELECT entry_id, user_id, cat_id, AVG( rating ) as avg_rate FROM
with my current query and loop: $sched = mysql_query(SELECT * FROM `shows` ORDER BY
This is my current query: SELECT DISTINCT t.* FROM filter AS f INNER JOIN
My current query: SELECT Series.*, Episodes.* FROM Series, Episodes WHERE EpisodeAirDate > '.time().' AND
This is an example version of my current SQL query: SELECT DISTINCT files.* FROM
Current query SELECT * FROM employee AS E INNER JOIN credential AS C ON
I have a working query that will return some results(records) from my database, like:
Here is my current query: SELECT sac.cred, s.status, (SELECT NVL (csl.census_dates, tl.census_dates) FROM schema.sections
My current query: SELECT * FROM `reported_users` GROUP BY `reported_user` ORDER BY ??? I

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.