What are the limitations of Fast query?












8















After reviewing this question and answer you can see that the use of Fast query is the leading cause of migraines. (<- unverified claim)



What are limitations a developer should take into account when using Fast query?










share|improve this question





























    8















    After reviewing this question and answer you can see that the use of Fast query is the leading cause of migraines. (<- unverified claim)



    What are limitations a developer should take into account when using Fast query?










    share|improve this question



























      8












      8








      8


      1






      After reviewing this question and answer you can see that the use of Fast query is the leading cause of migraines. (<- unverified claim)



      What are limitations a developer should take into account when using Fast query?










      share|improve this question
















      After reviewing this question and answer you can see that the use of Fast query is the leading cause of migraines. (<- unverified claim)



      What are limitations a developer should take into account when using Fast query?







      sitecore-query






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 23 at 17:09







      Michael West

















      asked Jan 23 at 16:41









      Michael WestMichael West

      8,80921455




      8,80921455






















          1 Answer
          1






          active

          oldest

          votes


















          10














          Article by John West



          I came across a nice article written by John West which provides important information for developers.



          Known limitations:




          • Fast query does not account for the context language (results include items with versions that match the query in any language)

          • Fast query does not support sorting (sort results after querying)

          • In a fast query, attributes should not appear at the beginning of a predicate, directly after the opening square bracket character ([)

          • Fast query supports only the parent, child, ancestor, and descendant axes, the latter two only when the FastQueryDescendantsDisabled setting is false

          • Fast query does not support standard values

          • Fast query does not support functions, though it provides an alternative to the contains and therefore I assume the startswith() and endswith() functions

          • Fast query does not support operators

          • Fast query does not support subqueries, which are queries within predicates (square brackets – characters)

          • Fast Query works for data providers that inherit from the SqlDataProvider class and that support SQL queries generated by the QueryToSqlTranslator class

          • Fast query does not support query catenation (using pipe delimiter to separate paths)


          The one about data providers could explain why you would not use Fast queries with Unicorn.



          Here is a valuable piece of advice:




          I would avoid [Sitecore] Fast query [unless] Sitecore query underperforms and you have very specific requirements met despite these limitations. I believe Sitecore query may be especially poor for queries that process small branches of items, as I assume it queries the entire database and then filters the results by branch.




          I also found some articles that pointed out useful limitations.




          • Fast query does not guarantee results are returned in the proper tree sort order. Link.

          • Fast query performs best with fewer than 10 fields in each condition statement. Link.

          • Dashes must be escaped in queries. Link.


          Found in a Sitecore guide (Using Sitecore Fast Queries)




          • Fast query does not return virtual items in the result set.


          Limitations disguised as Benefits



          These are some benefits from the document, but could also be treated like a limitation.




          • Queries are executed by the SQL engine and as a result the scalability and performance of the SQL engine is not limited by .NET or by Sitecore.

          • Sitecore Query loads every item that it touches into memory (cache) and this can fill the cache with unnecessary information. Sitecore Fast Query only loads the items from the result set and this minimizes the pressure on the cache. Read more about it here (thanks @vandsh for the link).






          share|improve this answer





















          • 1





            I'd also like to add that it bypasses cache mechanisms (intothecloud.blog/2018/10/21/…) not to mention having to escape dashes (stackoverflow.com/questions/4205288/…)

            – vandsh
            Jan 23 at 18:19











          • There also appears to be a reliance on Links DB. Not 100% verified, but a fast query (and likely normal query) with a where clause will determine the relationship from the links db. e.g. fast:/sitecore/content/home/*[@@templateid='{3B0461BF-9ABC-4AF1-B937-C8D225FC2313}']. If links db is out of date, no results may be returned.

            – jrap
            Jan 23 at 18:50











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "664"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f16203%2fwhat-are-the-limitations-of-fast-query%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          10














          Article by John West



          I came across a nice article written by John West which provides important information for developers.



          Known limitations:




          • Fast query does not account for the context language (results include items with versions that match the query in any language)

          • Fast query does not support sorting (sort results after querying)

          • In a fast query, attributes should not appear at the beginning of a predicate, directly after the opening square bracket character ([)

          • Fast query supports only the parent, child, ancestor, and descendant axes, the latter two only when the FastQueryDescendantsDisabled setting is false

          • Fast query does not support standard values

          • Fast query does not support functions, though it provides an alternative to the contains and therefore I assume the startswith() and endswith() functions

          • Fast query does not support operators

          • Fast query does not support subqueries, which are queries within predicates (square brackets – characters)

          • Fast Query works for data providers that inherit from the SqlDataProvider class and that support SQL queries generated by the QueryToSqlTranslator class

          • Fast query does not support query catenation (using pipe delimiter to separate paths)


          The one about data providers could explain why you would not use Fast queries with Unicorn.



          Here is a valuable piece of advice:




          I would avoid [Sitecore] Fast query [unless] Sitecore query underperforms and you have very specific requirements met despite these limitations. I believe Sitecore query may be especially poor for queries that process small branches of items, as I assume it queries the entire database and then filters the results by branch.




          I also found some articles that pointed out useful limitations.




          • Fast query does not guarantee results are returned in the proper tree sort order. Link.

          • Fast query performs best with fewer than 10 fields in each condition statement. Link.

          • Dashes must be escaped in queries. Link.


          Found in a Sitecore guide (Using Sitecore Fast Queries)




          • Fast query does not return virtual items in the result set.


          Limitations disguised as Benefits



          These are some benefits from the document, but could also be treated like a limitation.




          • Queries are executed by the SQL engine and as a result the scalability and performance of the SQL engine is not limited by .NET or by Sitecore.

          • Sitecore Query loads every item that it touches into memory (cache) and this can fill the cache with unnecessary information. Sitecore Fast Query only loads the items from the result set and this minimizes the pressure on the cache. Read more about it here (thanks @vandsh for the link).






          share|improve this answer





















          • 1





            I'd also like to add that it bypasses cache mechanisms (intothecloud.blog/2018/10/21/…) not to mention having to escape dashes (stackoverflow.com/questions/4205288/…)

            – vandsh
            Jan 23 at 18:19











          • There also appears to be a reliance on Links DB. Not 100% verified, but a fast query (and likely normal query) with a where clause will determine the relationship from the links db. e.g. fast:/sitecore/content/home/*[@@templateid='{3B0461BF-9ABC-4AF1-B937-C8D225FC2313}']. If links db is out of date, no results may be returned.

            – jrap
            Jan 23 at 18:50
















          10














          Article by John West



          I came across a nice article written by John West which provides important information for developers.



          Known limitations:




          • Fast query does not account for the context language (results include items with versions that match the query in any language)

          • Fast query does not support sorting (sort results after querying)

          • In a fast query, attributes should not appear at the beginning of a predicate, directly after the opening square bracket character ([)

          • Fast query supports only the parent, child, ancestor, and descendant axes, the latter two only when the FastQueryDescendantsDisabled setting is false

          • Fast query does not support standard values

          • Fast query does not support functions, though it provides an alternative to the contains and therefore I assume the startswith() and endswith() functions

          • Fast query does not support operators

          • Fast query does not support subqueries, which are queries within predicates (square brackets – characters)

          • Fast Query works for data providers that inherit from the SqlDataProvider class and that support SQL queries generated by the QueryToSqlTranslator class

          • Fast query does not support query catenation (using pipe delimiter to separate paths)


          The one about data providers could explain why you would not use Fast queries with Unicorn.



          Here is a valuable piece of advice:




          I would avoid [Sitecore] Fast query [unless] Sitecore query underperforms and you have very specific requirements met despite these limitations. I believe Sitecore query may be especially poor for queries that process small branches of items, as I assume it queries the entire database and then filters the results by branch.




          I also found some articles that pointed out useful limitations.




          • Fast query does not guarantee results are returned in the proper tree sort order. Link.

          • Fast query performs best with fewer than 10 fields in each condition statement. Link.

          • Dashes must be escaped in queries. Link.


          Found in a Sitecore guide (Using Sitecore Fast Queries)




          • Fast query does not return virtual items in the result set.


          Limitations disguised as Benefits



          These are some benefits from the document, but could also be treated like a limitation.




          • Queries are executed by the SQL engine and as a result the scalability and performance of the SQL engine is not limited by .NET or by Sitecore.

          • Sitecore Query loads every item that it touches into memory (cache) and this can fill the cache with unnecessary information. Sitecore Fast Query only loads the items from the result set and this minimizes the pressure on the cache. Read more about it here (thanks @vandsh for the link).






          share|improve this answer





















          • 1





            I'd also like to add that it bypasses cache mechanisms (intothecloud.blog/2018/10/21/…) not to mention having to escape dashes (stackoverflow.com/questions/4205288/…)

            – vandsh
            Jan 23 at 18:19











          • There also appears to be a reliance on Links DB. Not 100% verified, but a fast query (and likely normal query) with a where clause will determine the relationship from the links db. e.g. fast:/sitecore/content/home/*[@@templateid='{3B0461BF-9ABC-4AF1-B937-C8D225FC2313}']. If links db is out of date, no results may be returned.

            – jrap
            Jan 23 at 18:50














          10












          10








          10







          Article by John West



          I came across a nice article written by John West which provides important information for developers.



          Known limitations:




          • Fast query does not account for the context language (results include items with versions that match the query in any language)

          • Fast query does not support sorting (sort results after querying)

          • In a fast query, attributes should not appear at the beginning of a predicate, directly after the opening square bracket character ([)

          • Fast query supports only the parent, child, ancestor, and descendant axes, the latter two only when the FastQueryDescendantsDisabled setting is false

          • Fast query does not support standard values

          • Fast query does not support functions, though it provides an alternative to the contains and therefore I assume the startswith() and endswith() functions

          • Fast query does not support operators

          • Fast query does not support subqueries, which are queries within predicates (square brackets – characters)

          • Fast Query works for data providers that inherit from the SqlDataProvider class and that support SQL queries generated by the QueryToSqlTranslator class

          • Fast query does not support query catenation (using pipe delimiter to separate paths)


          The one about data providers could explain why you would not use Fast queries with Unicorn.



          Here is a valuable piece of advice:




          I would avoid [Sitecore] Fast query [unless] Sitecore query underperforms and you have very specific requirements met despite these limitations. I believe Sitecore query may be especially poor for queries that process small branches of items, as I assume it queries the entire database and then filters the results by branch.




          I also found some articles that pointed out useful limitations.




          • Fast query does not guarantee results are returned in the proper tree sort order. Link.

          • Fast query performs best with fewer than 10 fields in each condition statement. Link.

          • Dashes must be escaped in queries. Link.


          Found in a Sitecore guide (Using Sitecore Fast Queries)




          • Fast query does not return virtual items in the result set.


          Limitations disguised as Benefits



          These are some benefits from the document, but could also be treated like a limitation.




          • Queries are executed by the SQL engine and as a result the scalability and performance of the SQL engine is not limited by .NET or by Sitecore.

          • Sitecore Query loads every item that it touches into memory (cache) and this can fill the cache with unnecessary information. Sitecore Fast Query only loads the items from the result set and this minimizes the pressure on the cache. Read more about it here (thanks @vandsh for the link).






          share|improve this answer















          Article by John West



          I came across a nice article written by John West which provides important information for developers.



          Known limitations:




          • Fast query does not account for the context language (results include items with versions that match the query in any language)

          • Fast query does not support sorting (sort results after querying)

          • In a fast query, attributes should not appear at the beginning of a predicate, directly after the opening square bracket character ([)

          • Fast query supports only the parent, child, ancestor, and descendant axes, the latter two only when the FastQueryDescendantsDisabled setting is false

          • Fast query does not support standard values

          • Fast query does not support functions, though it provides an alternative to the contains and therefore I assume the startswith() and endswith() functions

          • Fast query does not support operators

          • Fast query does not support subqueries, which are queries within predicates (square brackets – characters)

          • Fast Query works for data providers that inherit from the SqlDataProvider class and that support SQL queries generated by the QueryToSqlTranslator class

          • Fast query does not support query catenation (using pipe delimiter to separate paths)


          The one about data providers could explain why you would not use Fast queries with Unicorn.



          Here is a valuable piece of advice:




          I would avoid [Sitecore] Fast query [unless] Sitecore query underperforms and you have very specific requirements met despite these limitations. I believe Sitecore query may be especially poor for queries that process small branches of items, as I assume it queries the entire database and then filters the results by branch.




          I also found some articles that pointed out useful limitations.




          • Fast query does not guarantee results are returned in the proper tree sort order. Link.

          • Fast query performs best with fewer than 10 fields in each condition statement. Link.

          • Dashes must be escaped in queries. Link.


          Found in a Sitecore guide (Using Sitecore Fast Queries)




          • Fast query does not return virtual items in the result set.


          Limitations disguised as Benefits



          These are some benefits from the document, but could also be treated like a limitation.




          • Queries are executed by the SQL engine and as a result the scalability and performance of the SQL engine is not limited by .NET or by Sitecore.

          • Sitecore Query loads every item that it touches into memory (cache) and this can fill the cache with unnecessary information. Sitecore Fast Query only loads the items from the result set and this minimizes the pressure on the cache. Read more about it here (thanks @vandsh for the link).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 23 at 19:16

























          answered Jan 23 at 16:41









          Michael WestMichael West

          8,80921455




          8,80921455








          • 1





            I'd also like to add that it bypasses cache mechanisms (intothecloud.blog/2018/10/21/…) not to mention having to escape dashes (stackoverflow.com/questions/4205288/…)

            – vandsh
            Jan 23 at 18:19











          • There also appears to be a reliance on Links DB. Not 100% verified, but a fast query (and likely normal query) with a where clause will determine the relationship from the links db. e.g. fast:/sitecore/content/home/*[@@templateid='{3B0461BF-9ABC-4AF1-B937-C8D225FC2313}']. If links db is out of date, no results may be returned.

            – jrap
            Jan 23 at 18:50














          • 1





            I'd also like to add that it bypasses cache mechanisms (intothecloud.blog/2018/10/21/…) not to mention having to escape dashes (stackoverflow.com/questions/4205288/…)

            – vandsh
            Jan 23 at 18:19











          • There also appears to be a reliance on Links DB. Not 100% verified, but a fast query (and likely normal query) with a where clause will determine the relationship from the links db. e.g. fast:/sitecore/content/home/*[@@templateid='{3B0461BF-9ABC-4AF1-B937-C8D225FC2313}']. If links db is out of date, no results may be returned.

            – jrap
            Jan 23 at 18:50








          1




          1





          I'd also like to add that it bypasses cache mechanisms (intothecloud.blog/2018/10/21/…) not to mention having to escape dashes (stackoverflow.com/questions/4205288/…)

          – vandsh
          Jan 23 at 18:19





          I'd also like to add that it bypasses cache mechanisms (intothecloud.blog/2018/10/21/…) not to mention having to escape dashes (stackoverflow.com/questions/4205288/…)

          – vandsh
          Jan 23 at 18:19













          There also appears to be a reliance on Links DB. Not 100% verified, but a fast query (and likely normal query) with a where clause will determine the relationship from the links db. e.g. fast:/sitecore/content/home/*[@@templateid='{3B0461BF-9ABC-4AF1-B937-C8D225FC2313}']. If links db is out of date, no results may be returned.

          – jrap
          Jan 23 at 18:50





          There also appears to be a reliance on Links DB. Not 100% verified, but a fast query (and likely normal query) with a where clause will determine the relationship from the links db. e.g. fast:/sitecore/content/home/*[@@templateid='{3B0461BF-9ABC-4AF1-B937-C8D225FC2313}']. If links db is out of date, no results may be returned.

          – jrap
          Jan 23 at 18:50


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Sitecore Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f16203%2fwhat-are-the-limitations-of-fast-query%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

          Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

          A Topological Invariant for $pi_3(U(n))$