1 Reply Latest reply on Oct 14, 2016 8:47 AM by roberth55706517

    Query with no index defied

    patK Level 1

      While following the http://labs.6dglobal.com/blog/2015-03-09/oak-index-packages/  author said you will see the "WARN " message : 

      consider creating an index or changing the query

      When running a query with no index defied.  I am  traversing less than 100 nodes for my query and using Predicate Evaluators. 

      I don't see the message when I run the query without an index  , does that mean  I should not consider creating an index ? . 

        • 1. Re: Query with no index defied
          roberth55706517 Level 1

          It could be that you don't have enough data for the query analyzer to see a problem. Be careful assuming that when developing applications that search data that your developer tests will hold in production. Developers often test with so few records that problems with indexes and queries aren't seen then in production they bring applications to a stop. I've seen poorly constructed tables and queries take over  a day to run then apply an index, rearrange the query, and the query looking for the exact same data take a few minutes. If you are performing searches often, add indexes, structure your query so that the filter that excludes the most records is the first filter in the list. This is one of the reasons I always like to see the actual data structure and run some test queries before I develop applications that heavily access data through queries.This is one reason that DBA's make the kind of money they do.