# Huge tables in Tag Historian

**URL:** <https://forum.inductiveautomation.com/t/huge-tables-in-tag-historian/23846>\
**Category:** Ignition\
**Created:** [April 4, 2019, 11:07am UTC](https://forum.inductiveautomation.com/t/huge-tables-in-tag-historian/23846 "2019-04-04T11:07:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wofoster](https://avatars.discourse-cdn.com/v4/letter/w/aca169/32.png) [@wofoster](https://forum.inductiveautomation.com/u/wofoster)\
**Post date:** [April 4, 2019, 11:07am UTC](https://forum.inductiveautomation.com/t/huge-tables-in-tag-historian/23846/1 "2019-04-04T11:07:31Z")

</div>

Hi all:

I have an issue with a huge database of tag historian with Millions of registers. I am trying to find the the root cause of this huge tables . I suspect some History scanclass can has any bad setup.

In this case i am working directly with mysql . However i just only get time out in my queries.

For example i try:

select tagid,count(tagid) from sqlt\_data\_1\_20190227 group by tagid

Any ideas?  
.  
Thanks in advance,
