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 7592159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:50:12+00:00 2026-05-30T20:50:12+00:00

I have a database with 75,000+ rows with 500+ entries added per day. Each

  • 0

I have a database with 75,000+ rows with 500+ entries added per day.

Each row has a title and description.

I created an RSS feed which gives you the latest entries for a specific search term (ex. http://site.com/rss.rss?q=Pizza would output an RSS for the search term “Pizza”).

I was wondering what would be the best way to write the SQL query for this. Right now I have:

SELECT * 
FROM 'table' 
WHERE (('title' LIKE %searcherm%) OR ('description' LIKE %searcherm%))
LIMIT 20;

But the problem is it takes between 2 to 10 seconds to execute the query.

Is there a better way to write the query, do I have to cache the results (and how would I do that?) or would changing something in the database structure speed up the query (indexes?)

  • 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-30T20:50:14+00:00Added an answer on May 30, 2026 at 8:50 pm

    A relatively simple solution for this would be incorporating a FULLTEXT index on these two fields and subsequently searching by using this index.

    ALTER TABLE table ADD FULLTEXT(title, description);
    

    Then would you need to perform a search, you’d do the following:

    SELECT id FROM table
    WHERE MATCH (title, description) AGAINST ('keyterm');
    

    Fulltext indexed search is the automatic solution included in most SQL databases. It’s much speedier comparing to doing LIKES. This is also optimized for your specific case because you are only interested in natural language search terms.

    As well, fulltext index has some limiting algorithm for detecting relevancy. You can read more about it here

    EDIT

    In the alter statement, I missed the fulltext index name, it should be:

    ALTER TABLE table ADD FULLTEXT ft_index_name(title, description);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a table in our database which has around 2,500,000 rows (around 3GB).
I have a table (session) in a database which has almost 72,000 rows. I
I have a about 500.000 rows in database and they are look like: :hello:hi:
Suposse I have the next MySQL database with 500.000 rows : users { id
I have about 150 000 rows of data written to a database everyday. These
I have the video gallery in my database, which has over 200 000 videos.
I have a database table with 10,000,000+ rows which I process to create a
I have a SQLite database with with just over 6,000 rows of addresses in
We have a (currently InnoDB) table which contains roughly 500,000 rows. This represents a
I have 30,000 rows in a database that need to be similarity checked (using

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.