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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:53:14+00:00 2026-06-16T04:53:14+00:00

i have 2 dbs: one in mySql and one in MongoDB with the same

  • 0

i have 2 dbs: one in mySql and one in MongoDB with the same data inside…
i do the follow in mySQL:

Select tweet.testo From tweet Where tweet.testo like ‘%pizza%’

and this is the result:

1627 rows in set (2.79 sec) 

but if i exec in mongo:

Db.tweets.find({text: /pizza/ }).explain() 

this is the result:

nscannedObjects" : 1606334,
"n" : 1169,

or if i exec:

Db.tweets.find({text: /pizza/i }).explain() 

this is the result:

"nscannedObjects" : 1606334,
"n" : 1641,

Why the number of rows/document in mysql/mongo find is different?

  • 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-06-16T04:53:15+00:00Added an answer on June 16, 2026 at 4:53 am

    Why the number of rows/document in mysql/mongo find is different??

    There could be 1000000000000000 reasons including the temperature of the sun on that particular day.

    MongoDB and MySQL are two completely separate techs as such if you expect to keep both in synch you will need some kind of replicator between the two. You have not made us aware as to whether this is the case.

    Also we have no idea of your coding, server setup, network setup and everything else so really we cannot even begin to answer this.

    A good answer would be to say that the reason you are seeing this is because the data between the two is different…

    As for the difference between:

    Db.tweets.find({text: /pizza/ }).explain()
    

    and

    Db.tweets.find({text: /pizza/i }).explain() 
    

    This is because MySQL, by default, queries in lower case I believe and MongoDB (I know) does not as such it is case sensitive (this i makes it case insensitive).

    However about replicators, here is a good one: https://docs.continuent.com/wiki/display/TEDOC/Replicating+from+MySQL+to+MongoDB

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

Sidebar

Related Questions

Have deployed numerous report parts which reference the same view however one of them
I have a web-app that has a master mysql db and four slave dbs.
I have a MYSQL DB with two columns, one is the temperature and the
I have a Webapp which connects to 2 DBs (one core, the other is
My app consolidates data from other DBs for reporting purposes. We can't link the
I have two databases: first one is MySQL second one is MSSQL I need
I have 2 dbs and use replication between them to replicate one schema. (Oracle
I have been coding with MySQL DBs for a couple years now and I
ok, say you have two dbs. one you use as a master template which
Currently, I have a control flow that connects to more than 20 dbs (same

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.