Your SlideShare is downloading. ×
Intresting changes in mongo 2.6
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Intresting changes in mongo 2.6

279
views

Published on

MongoDB Austin April Meetup

MongoDB Austin April Meetup


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
279
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Interesting changes in Mongo 2.6 MongoDB Meetup April 2014 David Murphy - DBA Lead Masen Marshall - CDE Lead ObjectRocket
  • 2. Overview •Custom Roles With An Example ! • Index And Optimizer Improvements ! • Operational Improvements ! !
  • 3. Custom Roles Allow to provide access to specific functions and resources. Resources - Cluster, DBs, and Collection being types Privilege Actions - query, insert,update,remove, createIndex, createUser, ServerStatus and more
  • 4. Custom Roles - Resource Docs ! Cluster Type: { resource: { cluster : true }, actions: [ "collMod" ] } DB Type: { resource: {db: “foo”, collection:”” }, actions: [ "collMod" ] } Collection Type: { resource: {db: “”, collection:”bar” }, actions: [ "collMod" ] } !
  • 5. Custom Roles - Privilege Actions Many types , far to many to cover today http://docs.mongodb.org/manual/reference/privilege-actions/ ! Example user role might need: ! * readWrite ( include query,update,remove,insert…) * collMod * planCacheRead
  • 6. Custom Roles - Example Role db.createRole( { role: "expanded_readWrite_appDB", privileges: [{ resource: { db: "appDB",collection:"" }, actions: [ "planCacheRead","collMod" ]}], roles:[{ role: "readWrite", db: "appDB" }], writeConcern: { w: "majority" , wtimeout: 5000 } });
  • 7. Custom Roles - Add Role to User use appDB; db.createUser( { "user" : "appuser", "pwd": "Password123456", "roles" : [ { role: "expanded_readWrite_appDB", db: “appDB" }] }, { w: "majority" , wtimeout: 5000 } );
  • 8. Index & Optimizer Many new things in both Major items: • Query Plan Caching • Index Filtering • Index Intersections and their limits !
  • 9. Index & Optimizer - Query Plans ! Allows clearing per query. ! Regularly re-calculated per specific rules ! New grants required for non-admin users !
  • 10. Index & Optimizer - Index Filtering Based on Query shapes ! Shapes are a combination of query, sort, and projection specifications ! Hint + Filter = Awesome! !
  • 11. Index & Optimizer - Index Intersection Allow using 2 indexes currently, but no more ! Compound indexes are still faster ! Main use case is “self-intersection” where you want to query based on multiple vectors in the same array. ! All fields in union must be present in query for sort to use intersection.
  • 12. Index & Optimizer - Index Intersection Intersection Limits: • Less likely to use on in memory documents ! • Predicates are constant entry point not ranges ! • Neither index may be highly selective ! • If estimated inspection size is larger it will not be used
  • 13. Operation Improvements Secondary Index Build — HUGE WIN! Orphan Cleanup Command New Write Operation Protocol Enforce Index max key limits PowerOf2Sizes by default !
  • 14. Contact @dmurphy_data @objectrocket david@objectrocket.com masen@objectrocket.com ! https://www.objectrocket.com ! WE ARE HIRING! (DBA,DEVOPS, CDEs, and more) https://www.objectrocket.com/careers