If you want to create an index on both key and value:
Index <myIndexName> On CrossReferenceCodes(ELEMENTS, KEYS);
If you want to create an index on just the key of the array entry:
Index <myIndexName> On CrossReferenceCodes(KEYS);
If your property was defined as a list of datatypes:
Index<myIndexName> On CrossReferenceCodes(ELEMENTS);
As I said, this is not available in Caché 5.0 and while, e.g. 2007.1
will accept all these examples and will build the indices correctly
the sql engine will certainly ignore array key index. As of 2009.1 all
of this is working fine, as far as I can see.
Wolf
On 13 Nov, 20:21, Neerav Verma <
vnee...@gmail.com> wrote:
> So if I have an array of String how do I index it
> I tried
>
> Property CrossReferenceCodes As array Of %String;
> CrossReferenceCodesIdx on CrossReferenceCodes
>
> And it did not compile
>
> Thank You,
>
> Neerav Vermahttp://
www.linkedin.com/in/vneerav
> ------------------------------------------------------
> Ted Turner <
http://www.brainyquote.com/quotes/authors/t/ted_turner.html> -
> "Sports is like a war without the killing."
>
>
>
> On Fri, Nov 13, 2009 at 12:38 PM, Eric <
eric.ane...@gmail.com> wrote:
>
> > > I can't fully agree with your response. The question related
> > > specifically to Caché v5.0
>
> > Yes, but I initially stated: "My 2 cents answer applies to the current
> > release: "
>
> > > With regards to arrays of objects these are not swizzled into memory
> > > when you open the "one" object, that would be ludicrous, but the
> > > pointers to the "many" objects in the "one" class are indeed all
> > > loaded which is a performance overhead.
>
> > yes and when talking about "millions of records", loading the entire
> > array each time is too expansive. I don't see any advantages to arrays
> > for persistent objects, do you? Child relationships seem much more
> > efficient.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "InterSystems: Ensemble in Healthcare Community" group.
> > To post to this group, send email to
> >
Ensemble-in...@googlegroups.com
> > To unsubscribe from this group, send email to
> >
Ensemble-in-Healt...@googlegroups.com
> > For more options, visit this group at
> >
http://groups.google.com/group/Ensemble-in-Healthcare?hl=en- Hide quoted text -