Hello,
I am noticing that performance around system views, predominantly the views surrounding communications, are performing badly in comparison to the rest of the system.
If we take vListCommunication as an example, it has the following syntax in the SELECT statement: -
Account.*,
Company.*,
Communication.*,
Lead.*,
Comm_Link.*,
When I then view the estimated execution plan, I can see that there is a lot of cost associated to sorts, throughout the query when returning all of this.
If I then replace the table.* with the required fields: -
acc_accountId,acc_secterr,acc_createdby,acc_channelId,Acc_PrimaryUserId,
comp_companyId,comp_secterr,comp_createdby,comp_channelId,comp_primaryuserId,
Communication.*,
lead_leadId,lead_secterr,lead_createdby,lead_channelId,lead_assigneduserid,
Comm_Link.*,
The cost of the sorts is reduced, and the query is a lot more effiecient.
My question is, does anybody know a reason for returning everything on those tables? As this is a system view, I am a little nervous to make changes of this scale, but, the performance of the query is poor, so something needs to be done to address this view. I am looking to get as much information as I can before changing this on a live system.
Thanks for any help.