# tmp table with blob not using disk

**URL:** <https://forums.percona.com/t/tmp-table-with-blob-not-using-disk/1404>\
**Category:** Other MySQL® Questions\
**Created:** [May 10, 2010, 9:58am UTC](https://forums.percona.com/t/tmp-table-with-blob-not-using-disk/1404 "2010-05-10T09:58:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![atlantageek](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/atlantageek/32/829_2.png) [@atlantageek](https://forums.percona.com/u/atlantageek)\
**Post date:** [May 10, 2010, 9:58am UTC](https://forums.percona.com/t/tmp-table-with-blob-not-using-disk/1404/1 "2010-05-10T09:58:17Z")

</div>

I have a 10 million record table that contain 3 blobs.  
We do not search on these blobs. Instead we use them to do calculations using custom udf functions that do summarization on the blobs.

Anyway during large queries we see the ‘copying to tmp’ when we do some of these large queries. However when I do a show status I get this:  
mysql\> show status like ‘%tmp%’;  
±------------------------±------+  
| Variable\_name | Value |  
±------------------------±------+  
| Created\_tmp\_disk\_tables | 0 |  
| Created\_tmp\_files | 5 |  
| Created\_tmp\_tables | 1 |

But I thought that blobs would force the use of tmp\_disk\_tables?

Would performance benefit if I used memory disks as my tmpdir?

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [May 10, 2010, 12:21pm UTC](https://forums.percona.com/t/tmp-table-with-blob-not-using-disk/1404/2 "2010-05-10T12:21:52Z")

</div>

Are you doing SHOW GLOBAL STATUS, or just SHOW STATUS?

About performance – you’d have to determine that disk access was the bottleneck before you’d be able to know that.

---

<div class="post-metadata">

**Author:** ![Glenn.Nadeau](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@Glenn.Nadeau](https://forums.percona.com/u/Glenn.Nadeau)\
**Post date:** [May 10, 2010, 12:53pm UTC](https://forums.percona.com/t/tmp-table-with-blob-not-using-disk/1404/3 "2010-05-10T12:53:32Z")

</div>

But I thought that blobs would force the use of tmp\_disk\_tables?

From chapter 8 of MySQL performance tuning: If BLOB/TEXT fields are requested in the statement executed, disk based temporary tables are automatic.

I think you skirt that by using custom UDF functions.

Glenn

---

<div class="post-metadata">

**Author:** ![atlantageek](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/atlantageek/32/829_2.png) [@atlantageek](https://forums.percona.com/u/atlantageek)\
**Post date:** [May 10, 2010, 3:35pm UTC](https://forums.percona.com/t/tmp-table-with-blob-not-using-disk/1404/4 "2010-05-10T15:35:16Z")

</div>

Thanks. It was the missing GLOBAL option.
