Bug reports
Version 3.x > Bug reports > Kentico Performance: View_PageInfo UNION ALL View modes: 
User avatar
Member
Member
Rick - 9/23/2009 5:03:49 PM
   
Kentico Performance: View_PageInfo UNION ALL
In an attempt to improve scalability of a 3.1a site, I have been running SQL Profiler to see which queries are taking the longest.

I find many instances of queries similar to:

(SELECT * FROM View_PageInfo WHERE ((NodeSiteID = 1) AND (DocumentUrlPath = N'/pagepath') AND (DocumentUrlPath <> NodeAliasPath)))
UNION ALL
(SELECT * FROM View_PageInfo WHERE ((NodeSiteID = 1) AND (NodeAliasPath = N'/pagepath') AND (DocumentCulture = N'en-US')))


When I display the estimated execution plan for this query, I see that the first part of the union contains most of the query execution time. However, when I run it by itself I notice that it'll never return any records. Further, I don't see any records in my database that will ever return for this query. (Only one record in my database has a DocumentUrlPath set, the root /, and it is equal to NodeAliasPath).

Is this related to a feature we're not using? Is it possible to turn off that part of the query (which is generated by Kentico, as far as I know)?

User avatar
Member
Member
Rick - 9/23/2009 5:06:57 PM
   
RE:Kentico Performance: View_PageInfo UNION ALL
Sorry, I should have poked around more before asking. I have found the feature in the properties tab of the node, below the alias.

The second part of my question stands, though. If we are not using it, is there any way to remove this unnecessary query?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 9/29/2009 8:14:21 AM
   
RE:Kentico Performance: View_PageInfo UNION ALL
Hi,

Regrettably, it is not possible to remove such query from the system. I would recommend you to upgrade to Kentico CMS 4.1 where performance was improved which might solve your performance issue.

Best Regards,
Miroslav Remias.

User avatar
Member
Member
Rick - 9/29/2009 11:45:18 AM
   
RE:Kentico Performance: View_PageInfo UNION ALL
Yes, that makes sense. I was just hoping it was a switch somewhere that I had missed.

I appreciate the response. I believe we will just try to optimize based on caching and simplifying our pages.