HEAP tables also known as Memory tables are tables taht present in the memory. When creating a HEAP table in MySql, we needs to specify the TYPE of table as HEAP. These memory tables have values without data type like “BLOB” or “TEXT”. These table use hash indexes which make them relatively faster than MyISAM.
The temporary tables are used to store temporary data and they will be dropped when the current user’s session terminates. Where as HEAP table can exist for a long time if you do not restart your Database.
Temporary tables are specific to the user and not shared among other users, heap tables are shared. So to each database connection the temporary table is unique, for other connection the temporary tables of another connection are not existant.