D
David
Guest
I understand FIELDS option allows you to explicitly specify the fields we want to work with, which can be useful for optimizing performance and reducing unnecessary processing. It's particularly handy when dealing with large records.
But I still have a confusion whether specifying FIELDS can be more efficient than INDEX field or what? Just want to understand when to use FIELDS and INDEX. Below is the sample query.
Note - For field td_site no index defined..td_domain,td_line and td_nbr all together has one unique index field
Continue reading...
But I still have a confusion whether specifying FIELDS can be more efficient than INDEX field or what? Just want to understand when to use FIELDS and INDEX. Below is the sample query.
Code:
for first td_det
fields (td_domain td_line td_nbr td_site)
where td_domain = "ASS"
and td_nbr = "123"
and td_line = 1
no-lock:
end. /*for first td_det*/
Note - For field td_site no index defined..td_domain,td_line and td_nbr all together has one unique index field
Continue reading...