@Daniel Lichtblau I think you are right, the D is not capable in rewriting the expression as a symbolic sum, we have to use log likelihood. It works very well for the sum of log
In[112]:= f[x_]=1/(2*Pi*sigma^2)^0.5Exp[-(x-mu)^2/(2*sigma^2)]
In[113]:= p[x_]=Sum[Log[f[Subscript[x, i]]],{i,1,n}]
In[114]:= D[p[x],mu]