How to View MySQL Temp Files and Temp Tables in Linux

How to View MySQL Temp Files and Temp Tables in Linux

am 07.04.2010 23:45:33 von shamubro

--0016361e7efe5f25520483ac7b80
Content-Type: text/plain; charset=ISO-8859-1

Below is my MySQL Server's status and configuration. But I can not see
anything under /tmpfs/, it is showing empty to me.

here is the result of "ls -al"

drwxrwxrwx 2 mysql mysql 60 Apr 7 17:43 tmpfs
Could anyone tell me how to check the status of temp files and temp tables
on disk?

Thanks.

----
mysql> SHOW global STATUS LIKE 'created_tmp%';
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| Created_tmp_disk_tables | 4682 |
| Created_tmp_files | 291 |
| Created_tmp_tables | 10997 |
+-------------------------+-------+
mysql> SHOW variables LIKE '%tmp%';
+-------------------+----------+
| Variable_name | Value |
+-------------------+----------+
| bdb_tmpdir | /tmpfs/ |
| max_tmp_tables | 32 |
| slave_load_tmpdir | /tmpfs/ |
| tmp_table_size | 67108864 |
| tmpdir | /tmpfs/ |
+-------------------+----------+

--0016361e7efe5f25520483ac7b80--

Re: How to View MySQL Temp Files and Temp Tables in Linux

am 08.04.2010 11:00:40 von Johan De Meersman

--005045016333bb79eb0483b5e990
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Apr 7, 2010 at 11:45 PM, shamubro@gmail.com wrote:

> Below is my MySQL Server's status and configuration. But I can not see
> anything under /tmpfs/, it is showing empty to me.
>
> here is the result of "ls -al"
>
> drwxrwxrwx 2 mysql mysql 60 Apr 7 17:43 tmpfs
> Could anyone tell me how to check the status of temp files and temp tables
> on disk?
>

Tmp files get deleted as soon as MySQL is done with them. Some applications
will even delete them while they still have them open as a safety measure.

Install the "lsof" utility, and execute "lsof | grep DEL" to see
delete-but-still-open files.


--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--005045016333bb79eb0483b5e990--