• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
 

Mongo db index

on

  • 147 views

 

Statistics

Views

Total Views
147
Views on SlideShare
147
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Mongo db index Mongo db index Presentation Transcript

    • MongoDB IndexesIndexing explained.
    • Indexing.• MongoDB represents indexes internally as B-trees• Consider indexing keys that are used frequently in WHERE clauses.e.g > db.user.find("uName":”anish”) uName or user name is unique and not to changedfrequently ideal candidate for IndexTo create the index, use the ensureIndex method:One Key Indexdb.user.ensureIndex({“uName" : 1})“1” refer as DirectionTwo key Indexdb.ensureIndex({“uName" : 1, “emailId" : 1})Do not index Keys that are modified frequentlye.g Key containingtemp_addressremarks
    • Indexing CautionToo Much of Indexing will result in poorperformance in queryWhen choosing to index a key, consider whetherthe performance gain for queries is worth theperformance loss for INSERTs, UPDATEs, andDELETEs and the use of the space required tostore the index. You might want to experimentby comparing the processing times of the qurieswith and without indexes.
    • More Advanced querieshttp://docs.mongodb.org/manual/reference/operators/#AdvancedQueries-
    • Thanks for Watchingfeedbackappreciated…………………………