Suppose you have an application that allows users to write posts and comment on them. (Wait... that sounds familiar...)
For a given user, you want to be able to list all of the published posts with which that user has interacted - that is, either authored or commented on. How do you make this as fast as possible?
Here's what our %Persistent class definitions might look like as a starting point (storage definitions are important, but omitted for brevity):
Class DC.Demo.Post Extends%Persistent
{
Property Title As%String(MAXLEN = 255) [ Required ];Property Body As%String(MAXLEN = "") .png)
.png)


