|
Although it’s been mentioned in other papers and presentations, it’s worth emphasizing the
differences between object fetch and the DQL query call.
A Fetch call would retrieve all
attribute information of an object from server, this information will then be cached on the
client side. A DQL query such as: select object_name, r_content_size from dm_document where
r_object_id = ‘123456789' will only retrieve the attributes specified in the select statement of the query.
A dm_document object has around 70 attributes. If you are only interested in several attributes
of an object you should use a DQL statement to avoid retrieving unnecessary information, this becomes
significant especially in a low bandwidth environment. Fetch should used when most attributes of an
object are wanted, and/or that attribute information is repeatedly needed in multiple places.
Note that a DFC getObject() call is effectively a fetch call, you should avoid creating a idfsysobject
with dfsession.getObject() just to look at a couple attributes of the object, use query.execute(iDfSession,
DFCLib.IDfQuery_DF_READ_QUERY) and specify the attributes of interest in the select statement of the query instead.
|