I have a webpart with several CAML Querys that look like this:
SPSiteDataQuery qry = new SPSiteDataQuery();
qry.Lists = "<Lists ServerTemplate='104' Hidden='TRUE' />";
qry.Webs = "<Webs Scope='Recursive' />";
qry.ViewFields = "<FieldRef Name='Title' Nullable='TRUE' /><FieldRef Name='Author' /><FieldRef Name='Editor' /><FieldRef Name='Modified'/><FieldRef Name='Created'/>";
qry.RowLimit = 10;
qry.Query = "<OrderBy><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy>";
return web.GetSiteData(qry);
With distincts ServerTemplates id for each query. They all are returning the same ViewFields.
The problem is that the execution of that can last more than 10 seconds. I would like to reduce this. Any idea how to do this? Is there any way to have an union of all CAML queries?