Hey, just have a few questions regarding the number of SQL queries generated using typical query functionality.
Are the number of SQL queries generated due to the application being in debug mode? Worth noting that these sql queries only occur when the application is reset on first view, and not every browser refresh - however would have assumed much of this information would be coming from umbraco.config, not DB queries?
eg. for linq style queries on IPublishedContent to generate menus such as
Root.Children.Where(x => x.IsVisible());
and corresponding view
@foreach (var page in Model.MainMenu) {
var active = page.IsAncestorOrSelf(Model.Content) ? "class=\"active\"" : "";
<li @Html.Raw(active)><a href="@page.Url">@page.Name</a></li>
}
It generates over 100 SQL queries - 64 of them (with duplicates) related to that view code
Query on Umbraco SQL performance
Hey, just have a few questions regarding the number of SQL queries generated using typical query functionality.
Are the number of SQL queries generated due to the application being in debug mode? Worth noting that these sql queries only occur when the application is reset on first view, and not every browser refresh - however would have assumed much of this information would be coming from umbraco.config, not DB queries?
eg. for linq style queries on IPublishedContent to generate menus such as
and corresponding view
It generates over 100 SQL queries - 64 of them (with duplicates) related to that view code
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.