Re: Memory usage increasing constantly
Posted by: Rick James
Date: May 08, 2014 11:44PM

> So, basically I think we are counting them in the 320qps.

Yes, I believe that SETs count.

> We could optimize the application to avoid calling this instructions when not necessary

I agree that that is probably not worth bothering with. SETs are very fast.

> How can we make sure that the system is generating a lot of tmp tables?

mysql> SHOW GLOBAL STATUS LIKE 'Created_tmp%';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| Created_tmp_disk_tables | 931   |
| Created_tmp_files       | 13    |
| Created_tmp_tables      | 5322  |
+-------------------------+-------+
and then divide by Questions to get frequency of such.

> Is the memory allocated for tmp tables released after they get used?

It should be. However if there are multiple temp tables in a single SELECT, the memory/disk may not be released until the SELECT is finished.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.