Class club Extends %Persistent [ SqlTableName = CLUB ]{Property clubID As %String [ SqlColumnNumber = 2, SqlFieldName = CLUBID ];...}
Class member Extends %Persistent [ SqlTableName = MEMBER ]{Property memberID As %Integer [ SqlColumnNumber = 2, SqlFieldName = MEMBERID];...}
Class contract Extends %Persistent [ SqlTableName = CONTRACT ]{Property clubID As %Integer [ SqlColumnNumber = 2, SqlFieldName = CLUBID ];Property memberID As %Integer [ SqlColumnNumber = 3, SqlFieldName = MEMBERID, ];
... }
&sql(UPDATE CONTRACT (CLUBID,DATA1,DATA2,DATA3) Values (:club,:data1,:data2,:data3) where MEMBERID=:member)
I would start with a simple index on MemberID in the Contract table.
That should speed things up for the insert.
Other changes you could make if this is not live yet.
Define an index with IDKey = 1 / true for ClubID and MemberID in those tables
Then you can change the 2 properties in the Contract table to be:
Property clubID As Club [ SqlColumnNumber = 2, SqlFieldName = CLUBID ];
Property memberID As Member [ SqlColumnNumber = 3, SqlFieldName = MEMBERID, ];
Brendan
--
--
IRIS, Caché, Ensemble
---
You received this message because you are subscribed to the Google Groups "IRIS, Caché, Ensemble" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
intersystems-publi...@googlegroups.com.
To post to this group, send email to
intersystems...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.