Published on InterSystems Developer Community (https://community.intersystems.com)

Home > How to efficiently query collection properties

Article
David Loveluck · Feb 1, 2018 1m read

How to efficiently query collection properties

Here is a snippet that I learned yesterday

You can define an index on a collection property but when I tried to use it, I failed. I was using

     Select ….. where …. :xx %INLIST collproperty

But this will not use an index, but the equivalent syntax

     SELECT .. WHERE ... FOR SOME %ELEMENT(collproperty) (%VALUE=:xx)

will use the index 

Check out

     http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

 

Dave

#Performance #Tips & Tricks #Caché

Source URL:https://community.intersystems.com/post/how-efficiently-query-collection-properties