This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Indexing in mongodb  RSS feed

 
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

In mongodb collection I've one field which is a combination of uuid+string and I've indexed this field first in ascending order. I found search is a bit faster than without indexing this field.  But same test case when i executed in oracle then i found in this case oracle is faster than mongodb. I changed the indexing of this field in mongodb from ascending to hashed and still no difference.
I was reading one of the article where it was mentioned as indexing in mongodb is same as in oracle but oracle is faster than mongodb.
Did anyone tried this? Any idea about why it is slow? Or am i doing anything wrong or some sort of tuning is required at mongodb before using index.

Regards,
Vikas
 
Ranch Hand
Posts: 103
Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By design itself MongoDB would be slower than Oracle as Oracle is a relational database system unlike MongoDB which is a document oriented database.
RDBMS is optimized for quicker search, querying with multiple indexing and primary keys support.
If there is nothing stopping you and only the faster response matters switch to Oracle or similar such RDBMS such as MySQL, SQL-Server etc.
 
VikasKumar Gupta
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was able to fix this issue by making my query dynamic and it is running faster than oracle.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!