<p>As a point of reference, I run GetListItems operations (with a CAMLQuery option) on a list that has more than 12,000 records quite regularly. The query returns a set of 1-15 records on average and can do so in about 1-2 seconds. I'm only filtering on one field, however. I noticed your syntax for the CAMLQuery looks odd. It doesn't appear you're nesting your <And> tags properly. When you break yours out, it appears like...</p><div style="color: black; background-color: white;"><div style="color: black; background-color: white;"><pre><Query><Where><And><Eq><FieldRef Name=<span style="color: #a31515;">'User_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowUserId+"</span></Value></Eq><And><Eq><FieldRef Name=<span style="color: #a31515;">'Role_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowRoleId+"</span></Value></Eq><And><Eq><FieldRef Name=<span style="color: #a31515;">'Skill_x0020_Category_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowCategoryId+"</span></Value></Eq><Eq><FieldRef Name=<span style="color: #a31515;">'Skill_x0020_Group_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowGroupId+"</span></Value></Eq></And></And></And></Where></Query></pre></div></div><div style="color: black; background-color: white;">Try re-constructing your CAML to look like the example below and see if it makes a difference</div><p></p><div style="color: black; background-color: white;"><pre><Query><Where><And><And><Eq><FieldRef Name=<span style="color: #a31515;">'User_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowUserId+"</span></Value></Eq><Eq><FieldRef Name=<span style="color: #a31515;">'Role_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowRoleId+"</span></Value></Eq></And><And><Eq><FieldRef Name=<span style="color: #a31515;">'Skill_x0020_Category_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowCategoryId+"</span></Value></Eq><Eq><FieldRef Name=<span style="color: #a31515;">'Skill_x0020_Group_x003a_ID'</span> /><Value Type=<span style="color: #a31515;">'Lookup'</span>><span style="color: #a31515;">"+rowGroupId+"</span></Value></Eq></And></And></Where></Query></pre></div><p>This way, your conditions are all grouped in pairs, nests of pairs.</p><p>Geoff</p>
↧