Intresting changes in mongo 2.6

602 views

Published on

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
602
On SlideShare
0
From Embeds
0
Number of Embeds
38
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Intresting changes in mongo 2.6

  1. 1. Interesting changes in Mongo 2.6 MongoDB Meetup April 2014 David Murphy - DBA Lead Masen Marshall - CDE Lead ObjectRocket
  2. 2. Overview •Custom Roles With An Example ! • Index And Optimizer Improvements ! • Operational Improvements ! !
  3. 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. 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. 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. 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. 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. 8. Index & Optimizer Many new things in both Major items: • Query Plan Caching • Index Filtering • Index Intersections and their limits !
  9. 9. Index & Optimizer - Query Plans ! Allows clearing per query. ! Regularly re-calculated per specific rules ! New grants required for non-admin users !
  10. 10. Index & Optimizer - Index Filtering Based on Query shapes ! Shapes are a combination of query, sort, and projection specifications ! Hint + Filter = Awesome! !
  11. 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. 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. 13. Operation Improvements Secondary Index Build — HUGE WIN! Orphan Cleanup Command New Write Operation Protocol Enforce Index max key limits PowerOf2Sizes by default !
  14. 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

×