GetPointsSQL versus GetPoints

Discussion created by rdavin Employee on Feb 18, 2010
Latest reply on Oct 31, 2011 by jlakumb

In a recent post, http://vcampus.osisoft.com/forums/t/819.aspx?PageIndex=2, I commented about that PI OleDb was much faster than PISDK GetPoints when hitting a PI server with lots of tags.  I have over 1.7 million tags.  Using GetPoints to return 9000 PI Points takes over 3 minutes whereas PI OleDb can return the 9000 tag names in 15 seconds.  Just stating a fact. Basically I am doing a simple search such as:


     _piserver.GetPoints("Tag = '*pH'")


Rhys, caching or the order in which I make the request has no bearing.


Steve, yes I tried using the GetPoints2 method and it to takes over 3 minutes.  I too was curious as to why PI OleDb was that much faster when it too uses the PISDK.  Here's some more info:


Using PIDlg.TagSearch takes 15 seconds or so.  However, it is unacceptable for my application because I do not want to prompt the user to select tags.  The user need only select the PI server and the app decides on the tags.


What I did discover is that by using GetPointsSQL method takes 10 seconds!  The filter can be the same or it can be "Tag like '*pH'" for the same results.  I avoided GetPointsSQL for one reason because the documentation says it can perform complex queries.  My query is simple and I am simple enought to think Complex=Slower.  I avoided GetPointsSQL for another reason because the documentation says that the SQL Subsystem limits tag names to 80 characters.  Yes, we do have tags > 80 characters although there are select applications I am writing where I know the tags are < 80 chars.


Now I am curious.  When I see a limit of 80 char tag names, I tend to think of PIAPI.  It makes me wonder if GetPointsSQL or the SQL Subsystem uses PIAPI under the hood.