Mysql 8 - Count(*) - performance issue
&quot;Duct Tape&quot; option: Remove the index on ID_User and replace it with an index on (ID_User,CREATION_DATE).
Best option: Get rid of the Id and find another suitable primary key such as (ID_User,&lt;timestamp&gt;).  This is preferable as it would: ensure uniqueness, remove the need for one index, and get rid of a useless column.