Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

The good:

Deleted 4 indexes.

 

The bad:

The indexes that we added takes up more RAM than the ones removed. To add to that, the `delete_spam` index that was removed had a size of 0 which does not really improve performance at all. 

 db.contents.stats(1024*1024) prod

{
"ns" : "comments-prod.contents",
"count" : 7567251,
"size" : 5808,
"avgObjSize" : 804,
"storageSize" : 6624,
"numExtents" : 29,
"nindexes" : 23,
"lastExtentSize" : 511,
"paddingFactor" : 1,
"systemFlags" : 1,
"userFlags" : 0,
"totalIndexSize" : 11907,
"indexSizes" : {
"_id_" : 328,
"parent_id_1" : 269,
"parent_ids_1" : 278,
"tags_array_1" : 253,
"author_id_1_course_id_1" : 494,
"votes.up_1__type_1" : 475,
"votes.down_1__type_1" : 467,
"commentable_id_1_created_at_-1" : 461,
"course_id_1__type_1_created_at_-1" : 736,
"_type_1_comment_thread_id_1_author_id_1_updated_at_1" : 489,
"comment_thread_id_1_sk_1" : 301,
"comment_thread_id_1_endorsed_1" : 142,
"_type_1_course_id_1_pinned_-1_created_at_-1" : 751,
"_type_1_course_id_1_pinned_-1_comment_count_-1_created_at_-1" : 793,
"_type_1_course_id_1_pinned_-1_votes.point_-1_created_at_-1" : 851,
"commentable_id_1" : 190,
"_type_1_course_id_1_context_1_pinned_-1_created_at_-1" : 709,
"_type_1_context_1" : 348,
"_type_-1_course_id_1_context_1_pinned_-1_last_activity_at_-1_created_at_-1" : 701,
"_type_-1_course_id_1_commentable_id_1_context_1_pinned_-1_created_at_-1" : 780,
"_type_-1_course_id_1_endorsed_-1_pinned_-1_last_activity_at_-1_created_at_-1" : 677,
"_type_-1_course_id_1_endorsed_-1_pinned_-1_votes.point_-1_created_at_-1" : 725,
"_type_-1_course_id_1_endorsed_-1_pinned_-1_comment_count_-1_created_at_-1" : 679
},
"ok" : 1
}

 db.contents.stats(1024*1024) loadtest

"_id_" : 290,
"parent_id_1" : 296,
"parent_ids_1" : 200,
"comment_thread_id_1" : 319,
"author_id_1" : 329,
"tags_array_1" : 293,
"last_activity_at_-1" : 245,
"author_id_1_course_id_1" : 496,
"votes.up_1__type_1" : 630,
"votes.down_1__type_1" : 596,
"commentable_id_1_created_at_-1" : 548,
"course_id_1__type_1_created_at_-1" : 933,
"_type_1_comment_thread_id_1_author_id_1_updated_at_1" : 607,
"comment_thread_id_1_sk_1" : 296,
"comment_thread_id_1_endorsed_1" : 142,
"_type_1_course_id_1_pinned_-1_created_at_-1" : 948,
"delete_spam_1" : 0,
"_type_1_course_id_1_pinned_-1_comment_count_-1_created_at_-1" : 1003,
"_type_1_course_id_1_pinned_-1_votes.point_-1_created_at_-1" : 1057,
"commentable_id_1" : 254,
"_type_1_course_id_1_context_1_pinned_-1_created_at_-1" : 1010,
"_type_1_commentable_id_1_context_1_pinned_-1_created_at_-1" : 784,
"_type_1_context_1" : 425,
"_type_-1_course_id_1_context_1_pinned_-1_last_activity_at_-1_created_at_-1" : 998,
"_type_1_course_id_1_context_1" : 860

  • No labels