{"id":3329,"date":"2014-06-27T21:19:43","date_gmt":"2014-06-28T01:19:43","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2014\/06\/27\/reduce-database-calls-to-improve-website-performance\/"},"modified":"2021-08-16T22:58:36","modified_gmt":"2021-08-17T02:58:36","slug":"reduce-database-calls-to-improve-website-performance","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/","title":{"rendered":"Reduce database calls to improve website performance"},"content":{"rendered":"<p>If you use a database for your website, reducing the database calls your site makes can help speed things up.<\/p>\n<p>Storing data inside a database makes it easier to retrieve, and makes your website more flexible. This convenience can also sometimes cause your website to take up more server resources and cause your site to load slower.<\/p>\n<h2>Use a cache to cut down on database calls<\/h2>\n<p>Most websites these days run on a CMS or Content Management system. These all rely on a database back-end to store your website content, and you can speed them all up by implementing caching.<\/p>\n<p>If one visitor requests a page, your CMS will use a database call to pull in that info. You can cache this info to a file, so that the next visitor won&#8217;t have to wait for the server to ask the database for that same information again.<\/p>\n<p>We have guides covering some of the most common CMS applications out there:<\/p>\n<ul>\n<li> <a href=\"\/support\/edu\/wordpress\/use-wordpress-cache-to-speed-up-your-site\/\" target=\"_blank\" rel=\"noopener\">WordPress cache<\/a> <\/li>\n<li> <a href=\"\/support\/edu\/joomla\/joomla-2-5\/global-module-caching\/\" target=\"_blank\" rel=\"noopener\">Joomla cache<\/a> <\/li>\n<li> <a href=\"\/support\/edu\/drupal\/optimize-drupal-7\/\" target=\"_blank\" rel=\"noopener\">Drupal 7 cache<\/a> <\/li>\n<li> <a href=\"\/support\/edu\/drupal\/drupal-performance-optimization\/\" target=\"_blank\" rel=\"noopener\">Drupal 8 cache<\/a> <\/li>\n<li> <a href=\"\/support\/edu\/prestashop\/enable-caching\/\" target=\"_blank\" rel=\"noopener\">Prestashop 1.5 cache<\/a> <\/li>\n<li> <a href=\"\/support\/edu\/prestashop\/make-prestashop16-load-faster\/\" target=\"_blank\" rel=\"noopener\">Prestashop 1.6 cache<\/a> <\/li>\n<\/ul>\n<h2>Limiting database calls without a CMS<\/h2>\n<p>If you aren&#8217;t using a CMS with a cache plugin to automatically reduce database calls, you&#8217;ll need to do this manually. Depending on how you&#8217;ve coded the site this can differ a lot.<\/p>\n<p>When coding your site think about how frequently database information might change. If you had a page called <span style=\"color: red;\">specials.php<\/span> that pulled in monthly specials from a database. That info might only change once a month if that.<\/p>\n<p>You could go ahead and update your database with the specials, then run your <span style=\"color: red;\">specials.php<\/span> script once. After that just use <span style=\"color: red;\">(Ctrl-U)<\/span> in your web-browser to view the HTML of that generated page.<\/p>\n<p>Copy all the HTML into a new file called <span style=\"color: red;\">specials.htm<\/span>. Then just link from your website to that static HTML page instead of the database driven PHP one.<\/p>\n<h2>Additional help for reducing database calls<\/h2>\n<p>There is a lot of great content on the web for how you can reduce database calls. If the information above doesn&#8217;t help you out, please comment below and ask for help and we&#8217;d be glad to update this guide with more!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you use a database for your website, reducing the database calls your site makes can help speed things up. Storing data inside a database makes it easier to retrieve, and makes your website more flexible. This convenience can also sometimes cause your website to take up more server resources and cause your site to<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4288,4305],"tags":[],"class_list":["post-3329","post","type-post","status-publish","format-standard","hentry","category-website","category-databases"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reduce database calls to improve website performance | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Using a database as the back-end of your website can make your website easier to manage. Reduce database calls to decrease system resource usage, and speed up your site!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reduce database calls to improve website performance | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Using a database as the back-end of your website can make your website easier to manage. Reduce database calls to decrease system resource usage, and speed up your site!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-28T01:19:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T02:58:36+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"Reduce database calls to improve website performance\",\"datePublished\":\"2014-06-28T01:19:43+00:00\",\"dateModified\":\"2021-08-17T02:58:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\"},\"wordCount\":373,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Website\",\"Working with Databases\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\",\"name\":\"Reduce database calls to improve website performance | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2014-06-28T01:19:43+00:00\",\"dateModified\":\"2021-08-17T02:58:36+00:00\",\"description\":\"Using a database as the back-end of your website can make your website easier to manage. Reduce database calls to decrease system resource usage, and speed up your site!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reduce database calls to improve website performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reduce database calls to improve website performance | InMotion Hosting","description":"Using a database as the back-end of your website can make your website easier to manage. Reduce database calls to decrease system resource usage, and speed up your site!","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:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/","og_locale":"en_US","og_type":"article","og_title":"Reduce database calls to improve website performance | InMotion Hosting","og_description":"Using a database as the back-end of your website can make your website easier to manage. Reduce database calls to decrease system resource usage, and speed up your site!","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2014-06-28T01:19:43+00:00","article_modified_time":"2021-08-17T02:58:36+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"Reduce database calls to improve website performance","datePublished":"2014-06-28T01:19:43+00:00","dateModified":"2021-08-17T02:58:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/"},"wordCount":373,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Website","Working with Databases"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/","name":"Reduce database calls to improve website performance | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2014-06-28T01:19:43+00:00","dateModified":"2021-08-17T02:58:36+00:00","description":"Using a database as the back-end of your website can make your website easier to manage. Reduce database calls to decrease system resource usage, and speed up your site!","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/reduce-database-calls-to-improve-website-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Reduce database calls to improve website performance"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=3329"}],"version-history":[{"count":2,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3329\/revisions"}],"predecessor-version":[{"id":84227,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3329\/revisions\/84227"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=3329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=3329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=3329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}