I have a blank page with 4 views placed as blocks in Content Bottom. This page is taking 75 seconds to load. According to Devel, there are 4 queries that comprise the bulk of the time. These are all identified as "_getFeeditemByItemid_block". I cannot find this function on my system. A query that takes 17 seconds (17,000 ms) is unacceptable, and even more so when it is repeated 4 times. Does anyone have any idea what this is and how I might address the slowness?
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
IIRC, _getFeeditemByItemid_block is part of the feed module or maybe it is a generated function on the fly as part of View in coordination with the feed module. So you would need to make sure the tables in the DB are setup properly with indexes. Do an explain in your DB admin tool for a copy of the query. The explain will help narrow what is happening; but it sounds like a full table read.
Earnie
On Tue, Jul 10, 2012 at 9:28 AM, Ms. Nancy Wichmann nan_wich@bellsouth.net wrote:
I have a blank page with 4 views placed as blocks in Content Bottom. This page is taking 75 seconds to load. According to Devel, there are 4 queries that comprise the bulk of the time. These are all identified as "_getFeeditemByItemid_block". I cannot find this function on my system. A query that takes 17 seconds (17,000 ms) is unacceptable, and even more so when it is repeated 4 times. Does anyone have any idea what this is and how I might address the slowness?
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
-- [ Drupal support list | http://lists.drupal.org/ ]
What Earnie said. Whenever you do sites with views, it's always best to spend some time and put the queries into mysql and do an explain. Even if you see queries executing in decent times, it's still best to double check because it could still be doing a full scan, but you just don't have that much data in at development.
A lot of times you can fix them with indexing, but there are the occasions when you actually need to rewrite the query in a module.
Jamie Holly http://www.intoxination.net http://www.hollyit.net
On 7/10/2012 11:01 AM, Earnie Boyd wrote:
IIRC, _getFeeditemByItemid_block is part of the feed module or maybe it is a generated function on the fly as part of View in coordination with the feed module. So you would need to make sure the tables in the DB are setup properly with indexes. Do an explain in your DB admin tool for a copy of the query. The explain will help narrow what is happening; but it sounds like a full table read.
Earnie
On Tue, Jul 10, 2012 at 9:28 AM, Ms. Nancy Wichmann nan_wich@bellsouth.net wrote:
I have a blank page with 4 views placed as blocks in Content Bottom. This page is taking 75 seconds to load. According to Devel, there are 4 queries that comprise the bulk of the time. These are all identified as "_getFeeditemByItemid_block". I cannot find this function on my system. A query that takes 17 seconds (17,000 ms) is unacceptable, and even more so when it is repeated 4 times. Does anyone have any idea what this is and how I might address the slowness?
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
-- [ Drupal support list | http://lists.drupal.org/ ]
Thanks, Jamie and Earnie. I finally found the code in a block. The queries had an incredibly bad sub-query for an IN clause. But it turns out that the block was a first attempt to get the data that the Views were generating, so the block wasn't even needed anymore. Removing that block brought the page down to 1.5 seconds. 10 hours to find, 10 seconds to fix...
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Jamie Holly
What Earnie said. Whenever you do sites with views, it's always best to
spend some time and put the queries into mysql and do an explain. Even if you see queries executing in decent times, it's still best to double check because it could still be doing a full scan, but you just don't have that much data in at development.
A lot of times you can fix them with indexing, but there are the occasions when you actually need to rewrite the query in a module.
Sounds about right, like woodworking, setup vs cut :)
Sent from my iPhone
On Jul 10, 2012, at 1:15 PM, "Ms. Nancy Wichmann" nan_wich@bellsouth.net wrote:
. 10 hours to find, 10 seconds to fix...
Nancy how were the queries created. Manually or automatically by views?
On Tue, Jul 10, 2012 at 10:15 AM, Ms. Nancy Wichmann <nan_wich@bellsouth.net
wrote:
Thanks, Jamie and Earnie. I finally found the code in a block. The queries had an incredibly bad sub-query for an IN clause. But it turns out that the block was a first attempt to get the data that the Views were generating, so the block wasn't even needed anymore. Removing that block brought the page down to 1.5 seconds. 10 hours to find, 10 seconds to fix...
*Nancy* Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Jamie Holly What Earnie said. Whenever you do sites with views, it's always best to spend some time and put the queries into mysql and do an explain. Even if you see queries executing in decent times, it's still best to double check because it could still be doing a full scan, but you just don't have that much data in at development.
A lot of times you can fix them with indexing, but there are the occasions when you actually need to rewrite the query in a module.
-- [ Drupal support list | http://lists.drupal.org/ ]