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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:30:46+00:00 2026-05-20T01:30:46+00:00

I have a database with 2.000.000 messages. When an user receipt a message I

  • 0

I have a database with 2.000.000 messages. When an user receipt a message I need find relevant messages in my database based in occurrence of words.

I had tried run a batch process to summarize my database:
1 – Store all words(except an, a, the, of, for…) of all messages.
2 – Create association between all messages and the words contained therein (I also store the frequence of this word appears in the message.)

Then, when I receipt a message:
1 – I parse words (it looks like with the first step of my batch process.)
2 – Perform query in database to fetching messages sorted by numbers of coincident words.

However, the process of updating my words base and the query to fetching similar messages are very heavy and slow. The word base update lasts ~1.2111 seconds for a message of 3000 bytes. The query similar messages lasts ~9.8 seconds for a message with same size.

The database tuning already been done and the code works fine.

I need a better algorithm to do it.

Any ideas?

  • 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-20T01:30:46+00:00Added an answer on May 20, 2026 at 1:30 am

    I would recommend using setting up Apache Solr (http://lucene.apache.org/solr/). It is very easy to setup and index millions of documents. Solr handles all the optimization necessary (although it is open source so you can tweak it if you feel you need to).

    You can then query using available APIs, I prefer the Java API SolrJ (http://wiki.apache.org/solr/Solrj). I typically see results returned in under one second.

    Solr typically outperforms MySQL for text indexing.

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

Sidebar

Related Questions

I have 30,000 rows in a database that need to be similarity checked (using
I have an SQL db with about 200,000 words. I need a query which
I have a large database of users (~200,000) that I'm transferring from a ASP.NET
I have about 150 000 rows of data written to a database everyday. These
I have a database in single user mode and I am trying to drop
At scheduled times (based on business rules), we need anywhere between 10,000 - 200,000
I have a personnel database of 10,000 individuals. I am developing a PHP CMS
I have a database table. I want the user to be able to modify
Suposse I have the next MySQL database with 500.000 rows : users { id
I have database heavy operations happening, which adds around 10,000 records to my Database.

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.