Copied to clipboard

Flag this post as spam?

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


  • yumin 51 posts 243 karma points
    May 17, 2013 @ 04:17
    yumin
    0

    How to distinguish between node and delete node in database?

    first why i must do this?

    I have tried most of the paging solutions in forum, performance is very low in the case of large amount of data, especially use of XSLT paging, test data 100 000 nodes, LoadRunner 100 concurrent time-consuming for a few minutes, almost collapsed, so I try to direct get paging data from the database, but get the deleted data, because umbraco delete nodes only mark the parentid -20, associated child nodes parentid unchanged, can not distinguish whether a node has been deleted, how do I use sql get undelete and released data  rather than using the API or XSLT?

     

    my umbraco ver is 4.11.7

     

    thanks in advance

  • yumin 51 posts 243 karma points
    May 20, 2013 @ 08:06
    yumin
    0

    can anybody help me?

  • Andreas Iseli 150 posts 427 karma points
    May 23, 2013 @ 09:33
    Andreas Iseli
    0

    Well you must the internals and I think you must write a JOIN Query regarding some other tables to achieve what you want. The best way would be to check the umbraco source code and the write your own store procedure with paging. But you must then also adjust the database permissions for your account.

    What approach do you currently use that has the low performance? Are you using the cached XML variant?

  • yumin 51 posts 243 karma points
    Jun 26, 2013 @ 10:09
    yumin
    0
    I get paging data use this code:
    string xPath = 'descendant::node()[@id='{0}']/dtNews [position() >= 0 and position() <= 10]';
    XPathNavigator xPathNavigator = umbraco.content.Instance.XmlContent.CreateNavigator(); //get all umbraco xml            
                XPathNodeIterator xPathNodeIterator = xPathNavigator.Select(xPath); //TODO: check xpath string is valid
                Node node;
                while (xPathNodeIterator.MoveNext())
                {
                    node = UmbracoHelper.GetNode(xPathNodeIterator.Current.Evaluate("string(@id)").ToString());
                    if (node != null) { nodes.Add(node); }
                }
     return nodes;

    if test nodes more than 50000, Takes about one minute to get results, I don't know why is slowly , can you tell me the best paging solution?

    thanks Andreas Iseli

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jun 26, 2013 @ 12:48
    Jeroen Breuer
    0

    Hello,

    Did you try the same thing with the new IPublishedContent? http://our.umbraco.org/documentation/Reference/Mvc/querying Maybe it's faster. 

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft