# Created\_tmp\_files ... What is the Cause?

**URL:** <https://forums.percona.com/t/created-tmp-files-what-is-the-cause/1231>\
**Category:** Other MySQL® Questions\
**Created:** [August 6, 2009, 5:49pm UTC](https://forums.percona.com/t/created-tmp-files-what-is-the-cause/1231 "2009-08-06T17:49:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mysqlbot](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mysqlbot](https://forums.percona.com/u/mysqlbot)\
**Post date:** [August 6, 2009, 5:49pm UTC](https://forums.percona.com/t/created-tmp-files-what-is-the-cause/1231/1 "2009-08-06T17:49:16Z")

</div>

Looking at a query that triggers a filesort (modified filesort method), I’m seeing the following:

±------------------------±------+| Created\_tmp\_disk\_tables | 0 || Created\_tmp\_files | 2 || Created\_tmp\_tables | 0 |±------------------------±------+

Normally in memory filesorts use heap tables in-memory until they get too big. I’m not seeing that here.

This server is not involved in replication, so those tmp files are not the issue.

So what exactly causes Created\_tmp\_files and are these tmp files in memory or disk?

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [August 7, 2009, 3:58am UTC](https://forums.percona.com/t/created-tmp-files-what-is-the-cause/1231/2 "2009-08-07T03:58:43Z")

</div>

1. in memory
2. unindexed group by/order by most likely
