{"id":31390,"date":"2017-06-08T16:49:27","date_gmt":"2017-06-08T23:49:27","guid":{"rendered":"https:\/\/virtual-dba.com\/?p=31390"},"modified":"2021-02-10T18:20:29","modified_gmt":"2021-02-11T01:20:29","slug":"troubleshooting-slow-queries-mongodb","status":"publish","type":"post","link":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/","title":{"rendered":"Troubleshooting Slow Queries in MongoDB"},"content":{"rendered":"<p>There are many reasons why your database queries can start to lag or experience throughput issues. In this article I will do troubleshooting on two common issues with slow queries and a way to fix each one. When doing any performance tuning on a database it&#8217;s important to do a vast amount of research first before making any changes to your database.<\/p>\n<p>I will be going over three steps you need to take in order to fix slow queries in MongoDB.<\/p>\n<h2>Troubleshooting Steps<\/h2>\n<ol>\n<li>Identifying the problem.<\/li>\n<li>Fixing the problem.<\/li>\n<li>Ways to avoid encountering the problem again.<\/li>\n<\/ol>\n<h2>Response Time Degradation (Slow Response Time)<\/h2>\n<h3>Working Set Is Larger Than Allowed RAM<\/h3>\n<p>Your working set is the amount of data and indexes that will be active and in use by your instance. If you have a particularly large system, you need to figure out what parts of your data are most used before you&#8217;re able to determine what your working set will be. If this is a particularly new instance, figuring out the growth of your system over a year will help you determine how much RAM to assign for your cache size.<\/p>\n<h4>Identify<\/h4>\n<p>First you will want to run mongostat.<\/p>\n<p>mongostat &#8211;port 27001 -o \u201ctime=time, dirty=dirty,used=used,insert=I,qrw=qrw,arw=arw\u201d<\/p>\n<p>Focus on the columns &#8220;dirty&#8221; and &#8220;used&#8221;. These two columns should be relatively the same in an optimal environment. If the &#8220;used&#8221; column is a significantly higher percentage than your &#8220;dirty&#8221; column, then you have not allowed enough RAM for your instance.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-1.jpg\" alt=\"\" width=\"459\" height=\"98\" class=\"alignnone size-full wp-image-31395\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-1.jpg 459w, https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-1-300x64.jpg 300w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/p>\n<h4>Fix<\/h4>\n<p>This can be fixed by setting your cache size higher. In your config file set the cacheSizeGB to the required amount for your working set.<\/p>\n<p>Storage:<br \/>\n&nbsp;&nbsp;wiredTiger:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;engineConfig:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cacheSizeGB:<\/p>\n<h4>Avoid<\/h4>\n<p>Properly plan out your mongoDB instance and also account for large changes in the system while you&#8217;re in maintenance mode or during downtime. If a change is going into your system that will significantly impact your working set size, always remember to account for this with increasing your RAM and then setting cacheSizeGB to accommodate.<\/p>\n<h3>Increased Query Time with Growing Data Set<\/h3>\n<p>As your data set grows your response time shouldn&#8217;t increase that much. There may be a small increase but it should not be linear with growth.<\/p>\n<h4>Identify<\/h4>\n<p>Let&#8217;s say we have a shopping database with a customers collection. Inside this customers collection, we want to find all customers that reside in the city of Orlando. Your end users have been reporting that this type of query has taken longer and longer to return. In order to diagnose, we need to run an explain plan on the query.<\/p>\n<p>db.customers.find({city: \u201cOrlando\u201d}).explain(\u201cexecutionStats\u201d)<\/p>\n<p>Scroll down to the executionStats and look inside for nReturned, executionTimeMillis and totalDocsExamined.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-2.jpg\" alt=\"\" width=\"818\" height=\"385\" class=\"alignnone size-full wp-image-31400\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-2.jpg 818w, https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-2-300x141.jpg 300w, https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-2-768x361.jpg 768w\" sizes=\"(max-width: 818px) 100vw, 818px\" \/><\/p>\n<p>Your nReturned shouldn\u2019t be extremely lower than your totalDocsExamined and your executionTimeMillis should be lower.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-3.jpg\" alt=\"\" width=\"811\" height=\"368\" class=\"alignnone size-full wp-image-31401\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-3.jpg 811w, https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-3-300x136.jpg 300w, https:\/\/virtual-dba.com\/wp-content\/uploads\/TroubleshootingSlowQueriesinMongoDB-3-768x348.jpg 768w\" sizes=\"(max-width: 811px) 100vw, 811px\" \/><\/p>\n<p>If you look down a little further inside executionStages you will find stage. This stage should not read &#8220;COLLSCAN&#8221;; this means a collection scan was performed and an index wasn&#8217;t used.<\/p>\n<h4>Fix<\/h4>\n<p>To fix this issue, you will want to create an index on the customers collection for the city field.<\/p>\n<p>db.customers.createIndex({city: 1})<\/p>\n<p>Once this index is created, you can run the explain plan again on your query and you should notice that your stage is now &#8220;fetch&#8221;, your nReturned matches or is significantly closer to your totalDocsExamined and your executionTimeMillis is lower.<\/p>\n<h4>Avoid<\/h4>\n<p>Create your indexes when you create the collection. This won&#8217;t always be the case, but you can mitigate a lot of headaches by properly planning what data your collection will contain and how that collection will be queried.<\/p>\n<p>For more troubleshooting help you can checkout <a href=\"https:\/\/docs.mongodb.com\/manual\/faq\/concurrency\/\">the Mongo Docs<\/a> or get help from a <a href=\"\/platforms\/mongo-db\/\">Virtual-DBA expert<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many reasons why your database queries can start to lag or experience throughput issues. In this article I will do troubleshooting on two common issues with slow queries and a way to fix each one. When doing any performance tuning on a database it&#8217;s important to do a vast amount of research first [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":31423,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","content-type":"","footnotes":""},"categories":[4166,2164],"tags":[4140,2312],"class_list":["post-31390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-mongodb","tag-mongodb-performance-tuning","tag-queries"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.1 (Yoast SEO v27.1.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Troubleshooting Slow Queries in MongoDB With A DBA Expert<\/title>\n<meta name=\"description\" content=\"In this blog we do Troubleshooting Slow Queries in MongoDB with an expert MongoDB DBA. For more troubleshooting help get in touch with Virtual-DBA today!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Troubleshooting Slow Queries in MongoDB\" \/>\n<meta property=\"og:description\" content=\"In this blog we do Troubleshooting Slow Queries in MongoDB with an expert MongoDB DBA. For more troubleshooting help get in touch with Virtual-DBA today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-08T23:49:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-11T01:20:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/virtual-dba.com\/media\/Troubleshooting-Slow-Queries-in-MongoDB.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"557\" \/>\n\t<meta property=\"og:image:height\" content=\"291\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"XTIVIA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:site\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"XTIVIA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/\"},\"author\":{\"name\":\"XTIVIA\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\"},\"headline\":\"Troubleshooting Slow Queries in MongoDB\",\"datePublished\":\"2017-06-08T23:49:27+00:00\",\"dateModified\":\"2021-02-11T01:20:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/\"},\"wordCount\":646,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg\",\"keywords\":[\"mongodb performance tuning\",\"Queries\"],\"articleSection\":[\"Blog\",\"MongoDB\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/\",\"url\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/\",\"name\":\"Troubleshooting Slow Queries in MongoDB With A DBA Expert\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg\",\"datePublished\":\"2017-06-08T23:49:27+00:00\",\"dateModified\":\"2021-02-11T01:20:29+00:00\",\"description\":\"In this blog we do Troubleshooting Slow Queries in MongoDB with an expert MongoDB DBA. For more troubleshooting help get in touch with Virtual-DBA today!\",\"breadcrumb\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg\",\"width\":557,\"height\":291,\"caption\":\"Troubleshooting Slow Queries in MongoDB\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtual-dba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Troubleshooting Slow Queries in MongoDB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtual-dba.com\/#website\",\"url\":\"https:\/\/virtual-dba.com\/\",\"name\":\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\",\"description\":\"Remote Database Administration\",\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtual-dba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/virtual-dba.com\/#organization\",\"name\":\"Virtual-DBA: Remote DBA | Remote Database Administration\",\"alternateName\":\"Virtual-DBA powered by XTIVIA\",\"url\":\"https:\/\/virtual-dba.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"width\":557,\"height\":291,\"caption\":\"Virtual-DBA: Remote DBA | Remote Database Administration\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/virtual_dba\",\"https:\/\/www.linkedin.com\/showcase\/36220649\/\",\"https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg\"],\"description\":\"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.\",\"email\":\"info@xtivia.com\",\"telephone\":\"8886853101\",\"legalName\":\"XTIVIA, Inc\",\"foundingDate\":\"1992-05-01\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"201\",\"maxValue\":\"500\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\",\"name\":\"XTIVIA\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"caption\":\"XTIVIA\"},\"url\":\"https:\/\/virtual-dba.com\/author\/xtivia\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Troubleshooting Slow Queries in MongoDB With A DBA Expert","description":"In this blog we do Troubleshooting Slow Queries in MongoDB with an expert MongoDB DBA. For more troubleshooting help get in touch with Virtual-DBA today!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/","og_locale":"en_US","og_type":"article","og_title":"Troubleshooting Slow Queries in MongoDB","og_description":"In this blog we do Troubleshooting Slow Queries in MongoDB with an expert MongoDB DBA. For more troubleshooting help get in touch with Virtual-DBA today!","og_url":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/","og_site_name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","article_published_time":"2017-06-08T23:49:27+00:00","article_modified_time":"2021-02-11T01:20:29+00:00","og_image":[{"width":557,"height":291,"url":"https:\/\/virtual-dba.com\/media\/Troubleshooting-Slow-Queries-in-MongoDB.jpg","type":"image\/jpeg"}],"author":"XTIVIA","twitter_card":"summary_large_image","twitter_creator":"@virtual_dba","twitter_site":"@virtual_dba","twitter_misc":{"Written by":"XTIVIA","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#article","isPartOf":{"@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/"},"author":{"name":"XTIVIA","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1"},"headline":"Troubleshooting Slow Queries in MongoDB","datePublished":"2017-06-08T23:49:27+00:00","dateModified":"2021-02-11T01:20:29+00:00","mainEntityOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/"},"wordCount":646,"commentCount":0,"publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg","keywords":["mongodb performance tuning","Queries"],"articleSection":["Blog","MongoDB"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/","url":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/","name":"Troubleshooting Slow Queries in MongoDB With A DBA Expert","isPartOf":{"@id":"https:\/\/virtual-dba.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg","datePublished":"2017-06-08T23:49:27+00:00","dateModified":"2021-02-11T01:20:29+00:00","description":"In this blog we do Troubleshooting Slow Queries in MongoDB with an expert MongoDB DBA. For more troubleshooting help get in touch with Virtual-DBA today!","breadcrumb":{"@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#primaryimage","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Troubleshooting-Slow-Queries-in-MongoDB.jpg","width":557,"height":291,"caption":"Troubleshooting Slow Queries in MongoDB"},{"@type":"BreadcrumbList","@id":"https:\/\/virtual-dba.com\/blog\/troubleshooting-slow-queries-mongodb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtual-dba.com\/"},{"@type":"ListItem","position":2,"name":"Troubleshooting Slow Queries in MongoDB"}]},{"@type":"WebSite","@id":"https:\/\/virtual-dba.com\/#website","url":"https:\/\/virtual-dba.com\/","name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","description":"Remote Database Administration","publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtual-dba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/virtual-dba.com\/#organization","name":"Virtual-DBA: Remote DBA | Remote Database Administration","alternateName":"Virtual-DBA powered by XTIVIA","url":"https:\/\/virtual-dba.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","width":557,"height":291,"caption":"Virtual-DBA: Remote DBA | Remote Database Administration"},"image":{"@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/virtual_dba","https:\/\/www.linkedin.com\/showcase\/36220649\/","https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg"],"description":"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.","email":"info@xtivia.com","telephone":"8886853101","legalName":"XTIVIA, Inc","foundingDate":"1992-05-01","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"201","maxValue":"500"}},{"@type":"Person","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1","name":"XTIVIA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","caption":"XTIVIA"},"url":"https:\/\/virtual-dba.com\/author\/xtivia\/"}]}},"_links":{"self":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/31390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/comments?post=31390"}],"version-history":[{"count":0,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/31390\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media\/31423"}],"wp:attachment":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media?parent=31390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/categories?post=31390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/tags?post=31390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}