Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • gilad 185 posts 425 karma points
    Jan 24, 2013 @ 13:04
    gilad
    0

    quistion about sql queries.

    Hii Jorge.

    First of all - great package and tool, thanks.

    I am try to profiling my site , built on umbraco 4.7.1.1 - update to 4.7.2 start with my top navigation and see that i have many of sql queries.

    According to your blog post i am try to change it, but still..

    When i do something like this : 

    var parent = @Model.AncestorOrSelf();
    if (parent != null) {
         dynamic[] topChildrens = parent.Children.ToArray();
         <ul id="topMenu">
               @foreach (var item in topChildrens)
                       {
    
                       }
          </ul>  
    }
    

    it is work with out any queries.

    but when add Where statment like this :

    @foreach (var item in topChildrens.Where(x => x.showOnTopMenu == true))

    It is make 213 queries. and mark most of them with - DUPLICATE

    Is that ok?

    Thanks in advance.

Please Sign in or register to post replies

Write your reply to:

Draft