Active queries in ignition gateway

Hello team ,

I am facing issue with a query where I have disabled all the query which have a data source =IQS. But still one of the query is getting executed every 10 mnts and taking 15 mnts to execute, when I tried to search that query in vision to disable , I can’t able to find this query ,
Please help me how to stop this query from getting executed or to disable this query

Someone could have made something that dynamically generates the SQL in your project so searching for the query could be hard. But what if you search for the table it is doing the work on, the FROM table (or INSERT INTO table or update or whatever type of query it may be).

If it's running on a schedule of 10 minute though I would guess you either have

  1. a gateway or client timer script running this
  2. a scheduled script (only for newer versions of Ignition)
  3. a tag change script on a tag that is probably turning true every 10th minute of the hour.

You may have a different datasource that is executing this query perhaps? In the gateway you should be able to go to Status->Databases, and pick your datasource, find the slow queries - should hopefully help you identify which source it is running on. If it's really taking 15 minutes it should stick out like a sore thumb (unless every query is taking that long on the db).

Thanks for the reply

For adding on details , this is a select query it is taking too long to run like it’s taking around 15-18 mnts .

I tried checking it on gateway scripts but that’s not present .

This query is running under infinity QS as a data source

Where the same query is been repeadly executing and still present in the active queries section .

Scripts aren't the only things that can run queries. Look for a query tag. Or search for a query binding in your UI.

1 Like

Yea easily could be and it's running periodically could have polling on.

Have you done a full project search (with everything checked off and everything included in the search) for the table that you are selecting from? Do you get any results from that? The table name at the very least should be written out somewhere. Then you can parse down your results from there.

I have tried searching for the query , initially when I have doing validation I have came across 4 queries which was longest recent queries , I disabled 3 of them , these 4 are from same data source , the 4 th query can’t be find .
I exported the tags and tried to find the 4 th query seems I can’t find that , but it is actively running in the gateway .

Keep the search as basic as possible, do not look for the whole query, look for the tablename it is selecting from only, for all you know parts of the query are dynamically generated by a script or expression etc and by searching for the full query, you are actually excluding it from your results.

1 Like

I tried searching using Find / Replace option but I couldn’t find it . Is there any other option I can use.

Now I tried to search only using the table name it resulted only the 3 query tags where it should have given 4 query tags . Those 3 tags I have already disabled. It’s not resulting the 4 th query

As @pturmel it may not be a tag. But if the other 3 tags were in the same folder or something, seems like a good place to start looking manually.

One other option, do you know what the SELECT clause looks like? Maybe one of the column names is unique or uniquely aliased, and you can try searching for that.

Same vein: where are you searching for the table name? What options are selected in the find replace tool?

1 Like

I am trying to search the table name using find/ replace and I have selected all the options “select all “

I believe that only defaults to Open Views/Open Windows like

image

so this is only searching 1 window I have currently open in designer.

What you want to do is click on Open Windows and select All windows. Do the same for views, templates.

1 Like

I will try to check this option with all the projects I have currently with my gateway