# Any idea about this sql query running every second

**URL:** <https://forum.mautic.org/t/any-idea-about-this-sql-query-running-every-second/26377>\
**Category:** Product Support\
**Created:** [December 11, 2022, 6:24pm UTC](https://forum.mautic.org/t/any-idea-about-this-sql-query-running-every-second/26377 "2022-12-11T18:24:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 11, 2022, 6:24pm UTC](https://forum.mautic.org/t/any-idea-about-this-sql-query-running-every-second/26377/1 "2022-12-11T18:24:31Z")

</div>

**Your software**  
My Mautic version is: 4.4.1  
My PHP version is: 7.4  
My Database type and version is:

**Your problem**  
My problem is:

Our DB is eating all CPU, so I ran slow query log and see this query every second… any idea what it is

```auto
SELECT l.* FROM leads l WHERE l.email = 'undefined';
# Time: 221211 13:19:00
# User@Host: mauticuser[mauticeuser] @ localhost []
# Thread_id: 116984 Schema: ams QC_hit: No
# Query_time: 3.508129 Lock_time: 0.000036 Rows_sent: 0 Rows_examined: 2330209
# Rows_affected: 0 Bytes_sent: 2647

```

These errors are showing in the log:

Steps I have tried to fix the problem:

---

<div class="post-metadata">

**Author:** ![sfahrenkrog1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/sfahrenkrog1/32/4583_2.png) [@sfahrenkrog1](https://forum.mautic.org/u/sfahrenkrog1)\
**Post date:** [December 14, 2022, 5:45pm UTC](https://forum.mautic.org/t/any-idea-about-this-sql-query-running-every-second/26377/2 "2022-12-14T17:45:27Z")

</div>

Hi mikeq

Sounds like a loop in one of the cron commands. I would try to disable the cronjobs and then execute each commands on the shell and looking for strange behaviour (like never ending commands).

Greetings  
Sebastian
