# Execute SQL query when a parameter changes

**URL:** <https://forum.inductiveautomation.com/t/execute-sql-query-when-a-parameter-changes/38827>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [September 18, 2020, 9:48am UTC](https://forum.inductiveautomation.com/t/execute-sql-query-when-a-parameter-changes/38827 "2020-09-18T09:48:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![informatica](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@informatica](https://forum.inductiveautomation.com/u/informatica)\
**Post date:** [September 18, 2020, 9:48am UTC](https://forum.inductiveautomation.com/t/execute-sql-query-when-a-parameter-changes/38827/1 "2020-09-18T09:48:57Z")

</div>

Good morning.

In Ignition **8.0.14** , I have a **SQL Query** in a “ **Query Tag** ”.  
The query uses a **parameter**. I would like the query to run only when the parameter value **changes** to avoid unnecessary requests to the server.  
So, the correct execution mode would be “ **Event Driven** ”?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e5e757eaa2c7a1b678a907c410b24e9ac2dd26b.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/9/d92aaa04e11cfeb81754257b6c06baf883dbc216.png)

Best Regards.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 18, 2020, 12:37pm UTC](https://forum.inductiveautomation.com/t/execute-sql-query-when-a-parameter-changes/38827/2 "2020-09-18T12:37:25Z")

</div>

Yes, that’s precisely how event driven works. A parameter change is the only way to trigger re-execution, as I understand it.
