Introduction to InterSystems DeepSee - InterSystems Documentation
Introduction to InterSystems DeepSee - InterSystems Documentation
Introduction to InterSystems DeepSee - InterSystems Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Real-time Incremental Index Updates<br />
1.6 Real-time Incremental Index Updates<br />
Rebuilding indices, in general, can be time-consuming, so <strong>DeepSee</strong> provides <strong>to</strong>ols <strong>to</strong> update the indices<br />
incrementally.<br />
First, if you enable incremental updates, <strong>DeepSee</strong> does the following: If a data change affects a record<br />
in the base BI-enabled class itself, <strong>DeepSee</strong> au<strong>to</strong>matically detects that change and updates the indices<br />
for that record. This occurs because the base BI-enabled class inherits from %BI.Adap<strong>to</strong>r, which provides<br />
the method %OnAfterSave() and the triggers HyperDelete, HyperInsert, and HyperUpdate. When<br />
an object is saved, Caché runs the method %OnAfterSave(), which updates the <strong>DeepSee</strong> indices for<br />
this object. Similarly, when an record is deleted, inserted, or updated via SQL, Caché fires the corresponding<br />
trigger, which updates the <strong>DeepSee</strong> indices for this object.<br />
Your <strong>DeepSee</strong> model can use data in other classes; if that data changes, it is the responsibility of your<br />
application <strong>to</strong> determine the IDs of the affected objects in the base class and then call the zzBuildOne()<br />
method of the base class <strong>to</strong> update the <strong>DeepSee</strong> indices for those classes.<br />
<strong>Introduction</strong> <strong>to</strong> <strong>InterSystems</strong> <strong>DeepSee</strong> 11