I have about 14 perspective projects (Identical GUI with different station no.s). I have the following query (Trace log screenshot) running every few seconds from different projects, but I am not able to find it even with project search through Designer Launcher.
The yellow highlighted shows the project-name but the view under is from a different project altogether (same discrepancy for other instances of this query log) and it adds ‘@C’ at the end too as shown. Is there a better way to track it down? Thanks
You can open the projects folder (Ignition\data\projects) in the Ignition installation directory with an application like Notepad++ or VSCode and search the folder for that string. You should find it in a query.sql file if it is a Named Query, a *.py file if it is built directly into a project library, or in a view.json file if it’s in a component action or a binding.
Update 1: *low chance it’s in an external python library which would be not located in the projects folder but in the path: \Ignition\user-lib\pylib so you might need to search there too.
Finally found the query object. So, the actual named query does not have TOP 1 in the query. I disabled the query on the object to make sure it’s not showing up in logs, verified it and re-enabled it.
Not sure why it’s being changed to ‘SELECT TOP 1 count(serial)’ from ‘Select count(serial)’ when the query is being executed.
Please throw some light if this behavior was observed before. Thanks.
Is the query returning a scalar1 value? This might cause the addition of the TOP 1 by Ignition's SQL engine.
1 The term "scalar" comes from linear algebra, where it is used to differentiate a single number from a vector or matrix. The meaning in computing is similar. It distinguishes a single value like an integer or float from a data structure like an array. Source: StackExchange.