# Multiple runNamedQueries or Stored Procedure?

**URL:** <https://forum.inductiveautomation.com/t/multiple-runnamedqueries-or-stored-procedure/35610>\
**Category:** Ignition\
**Created:** [June 12, 2020, 6:44pm UTC](https://forum.inductiveautomation.com/t/multiple-runnamedqueries-or-stored-procedure/35610 "2020-06-12T18:44:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [June 12, 2020, 6:44pm UTC](https://forum.inductiveautomation.com/t/multiple-runnamedqueries-or-stored-procedure/35610/1 "2020-06-12T18:44:29Z")

</div>

If I need to run +3 `runNamedQueries` in a row for a single operation, is it more efficient to just create a stored procedure and call it once to handle all the of the queries? I’ve only used a stored procedure call once in Igntion, and IIRC it is kind of verbose to make the call. Thoughts?

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [June 2, 2023, 5:18pm UTC](https://forum.inductiveautomation.com/t/multiple-runnamedqueries-or-stored-procedure/35610/2 "2023-06-02T17:18:00Z")

</div>

I only save a 10-20ms using a stored procedure. Indexing may cause varied results.

Sorry 3 year old post, was trying to find out how to handle a runNamedQuery result that didn't have a parameter match when I saw this.  
Figured it out, I check the data.rowCount\<1.
