This post is the direct result of working with an InterSystems customer who came to me with the following problem:
SELECT COUNT(*) FROM MyCustomTable
Takes 0.005 seconds, total 2300 rows. However:
SELECT * FROM MyCustomTable
Took minutes. The reason for this is subtle and interesting enough for me to write a post about. This post is lengthy, but if you scroll to the bottom I'll write a quick summary, so if you've gotten this far and think you've already read enough, scroll to the end to get the main point. Check for the sentence in bold.
There is consideration to take when creating your classes when it comes to storage. As many of you know, all data in Caché is stored in Globals.
If you don't know this then I think this post is going to be a bit much. I recommend checking out this excellent tutorial in our docs