{"id":82136,"date":"2013-12-17T10:18:13","date_gmt":"2013-12-17T18:18:13","guid":{"rendered":"https:\/\/tri.be\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/"},"modified":"2014-01-08T13:37:57","modified_gmt":"2014-01-08T21:37:57","slug":"super-slow-site-speed-horrifying-sql-query","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/","title":{"rendered":"Super Slow Site Speed &amp; Horrifying SQL Query"},"content":{"rendered":"<p>Hi Tribe!<br \/>\nOne of our clients was complaining about site speed, which led to a thorough investigation on our end about what could be causing the problem.  Through the use of a plugin called &#8220;Debug Queries&#8221;, we found out Tribe Events pages and widgets were executing ridiculous queries that significantly impacted site speed. <\/p>\n<p>For example, on http:\/\/ab-dev.hdmade.com\/events, the mini-calendar widget was executing this query: https:\/\/gist.github.com\/keccers\/8009558\/raw\/eda31a24246f331dca6502d408f5b9b641a9aa82\/tribe_events.sql<br \/>\n&#8230; FOR EVERY SINGLE DAY OF THE MONTH. Just change the days and repeat.<br \/>\nOur site load time was around 12 &#8211; 13 seconds and over 90% of that load time was attributed to the SQL. After disabling the widget, load time was cut down to HALF A SECOND. <\/p>\n<p>I can&#8217;t imagine you would have this many successful users if this is the way your plugin was intended to function.<br \/>\nAny insight, Tribe? <\/p>\n","protected":false},"template":"","class_list":["post-82136","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Super Slow Site Speed &amp; Horrifying SQL Query -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Super Slow Site Speed &amp; Horrifying SQL Query -\" \/>\n<meta property=\"og:description\" content=\"Hi Tribe! One of our clients was complaining about site speed, which led to a thorough investigation on our end about what could be causing the problem. Through the use of a plugin called &#8220;Debug Queries&#8221;, we found out Tribe Events pages and widgets were executing ridiculous queries that significantly impacted site speed. For example, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-01-08T21:37:57+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/\",\"name\":\"Super Slow Site Speed &amp; Horrifying SQL Query -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2013-12-17T18:18:13+00:00\",\"dateModified\":\"2014-01-08T21:37:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Super Slow Site Speed &amp; Horrifying SQL Query\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Super Slow Site Speed &amp; Horrifying SQL Query -","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:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/","og_locale":"en_US","og_type":"article","og_title":"Super Slow Site Speed &amp; Horrifying SQL Query -","og_description":"Hi Tribe! One of our clients was complaining about site speed, which led to a thorough investigation on our end about what could be causing the problem. Through the use of a plugin called &#8220;Debug Queries&#8221;, we found out Tribe Events pages and widgets were executing ridiculous queries that significantly impacted site speed. For example, [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/","article_modified_time":"2014-01-08T21:37:57+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/","name":"Super Slow Site Speed &amp; Horrifying SQL Query -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2013-12-17T18:18:13+00:00","dateModified":"2014-01-08T21:37:57+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/super-slow-site-speed-horrifying-sql-query\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Super Slow Site Speed &amp; Horrifying SQL Query"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/82136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/82136\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=82136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}