# Delay Between Transaction Group and Database

**URL:** <https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000>\
**Category:** Ignition\
**Created:** [November 27, 2020, 1:25am UTC](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000 "2020-11-27T01:25:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [November 27, 2020, 1:25am UTC](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000/1 "2020-11-27T01:25:08Z")

</div>

Hi there,

I have a warehouse where the information is saved to a database at the beginning of line and then the information is pulled again using the pallet number and a label is created and printed. This has been working now for 3+ years without any issues. But as of about 2 months ago there seems to be a delay between when the transaction group on ignition calls the insert statement to MySQL and when MySQL actually does the insert. Which in the end causes the label not to print the right information because the information doesn’t exist in the database until after its printed. However, this does not always happen. Its average between 1 in every 20-30 prints. I am on Ignition 7. Would anyone know where I should begin to figure out my issue.

---

<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:** [November 27, 2020, 1:52am UTC](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000/2 "2020-11-27T01:52:25Z")

</div>

Are you using the store and forward system? If so, consider turning it off (bypass) for that group.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [November 27, 2020, 2:33am UTC](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000/3 "2020-11-27T02:33:25Z")

</div>

Could be related to more records and slow response now. Lack of indexes or just poor queries and table setup. Do you see in gateway where certain queries are taking a long time?

---

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [November 27, 2020, 6:14am UTC](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000/4 "2020-11-27T06:14:48Z")

</div>

I bypassed the store and forward system. Let’s see if that helps.

---

<div class="post-metadata">

**Author:** ![brandon222](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@brandon222](https://forum.inductiveautomation.com/u/brandon222)\
**Post date:** [November 27, 2020, 6:16am UTC](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000/5 "2020-11-27T06:16:41Z")

</div>

Would you think that the more records in there the longer it takes to write a new one? I noticed that the table was never purged. So now I have gone ahead deleted data older then 2 months. It also isn’t cross referencing any other table its strictly inserting into a table and pulling from that same table.

---

<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:** [November 27, 2020, 12:53pm UTC](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000/6 "2020-11-27T12:53:11Z")

</div>

Do you have indices on the column(s) used in the where clause when retrieving? (The delay could be on the other end… and would get worse over time if not indexed.)
