Limit a Tag Search Count in GetPoints

Discussion created by MaxStrueverWipro on Aug 25, 2014
Latest reply on Aug 25, 2014 by Gregor



I have an app that allows users to search for tags. However, sometimes they perform searches which unintentionally return tons of tags very slowly, or even times out (web app).


as part of the WhereClause, is there something I could add to the query to limit the tag search to only return the first 50 tags? for 99% of the user's searches, they will not need more than the first 50 tags for this app. this would speed up most searches and give users an option to return the full search if they really needed. in real SQL this is accomplished by the TOP ## parameter. I think this might be called 'paging'


for example



myPIServer.GetPoints("tag = '" + userinputText + "'");
//is there a clause like this to bluntly limit the number of returned tags:
myPIServer.GetPoints("tag = '" + userinputText + "' AND count < 10");
myPIServer.GetPoints("tag = '" + userinputText + "' AND Limit 40");