#6379 Fix slow queries on the blog_post collection

v1.0.0
closed
General
2015-08-20
2013-06-19
No

These were added in prod mongo directly:

db.blog_post.ensureIndex({state: 1, app_config_id: 1, timestamp: -1}, {background: true});
db.blog_post.ensureIndex({state: 1, neighborhood_id: 1, timestamp: -1}, {background: true});

Need to add them in the class definition. Consider switching the order of the fields in these queries and removing the app_config_id-only index.

Related

Tickets: #6326

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-06-19
    • summary: Fix slow queries on the blog_post collection --> Fix slow queries on the blog_post & mailbox collections
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-19
    • labels: --> performance
     
    • labels: performance -->
    • summary: Fix slow queries on the blog_post & mailbox collections --> Fix slow queries on the blog_post collection
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1,6 @@
    +These were added in prod mongo directly:
    +
    +db.blog_post.ensureIndex({state: 1, app_config_id: 1, timestamp: -1}, {background: true});
    +db.blog_post.ensureIndex({state: 1, neighborhood_id: 1, timestamp: -1}, {background: true});
    +
    +Need to add them in the class definition. Consider switching the order of the fields in these queries and removing the app_config_id-only index.
    
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-19
    • labels: --> performance
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-19

    db/6379 has new mailbox index

     
  • New BlogPost indexes on tv/6379.

     
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-24
    • QA: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-24
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2013-06-24

    Seems like the bare app_config_id index comes from the Artifact class and isn't something we can easily get rid of right now.

    And fwiw, I'm pretty sure the order of fields in a query don't matter (since its a dict). Just the order of fields in an index do.

     

Log in to post a comment.