WOW  Victoria, 

thats a good explanation. That makes many things clearer now.
Thank you very much.

However, when not having the  set the tmpdir variable were are the temporary 
tables stored ? (I searched the whole harddisc) I assume in this case that 
they must be stored in the memory, is that right ?

Best regards

Nils Valentin
Tokyo/Japan

2003年 6月 25日 水曜日 19:17、Victoria Reznichenko さんは書きました:
> "Nils Valentin" <[EMAIL PROTECTED]> wrote:
> > I have some questions about temporary tables. I would appreciate any
> > replies:
> >
> > I created a temporary table f.e. like this:
> >
> > mysql> create temporary table temp SELECT * FROM relations;
> > Query OK, 4 rows affected (2.35 sec)
> > Records: 4  Duplicates: 0  Warnings: 0
> >
> > When I do
> >
> > mysql> show create table temp;
> >
> > Then it will give me this:
> > | temp  | CREATE TEMPORARY TABLE `temp` (
> >
> >  `member_id` int(16) NOT NULL default '0',
> >  `company_id` int(16) NOT NULL default '0',
> >  `membership_id` int(16) NOT NULL default '0'
> > ) TYPE=MyISAM CHARSET=latin1 |
> >
> >
> > Now what confuses me is that
> >
> > a) it says here TYPE=MyISAM
>
> Because MyISAM is default table type
>
> > b) I understood that only HEAP tables are stored in the memory.
>
> Yes.
>
> > I was assuming (until now) that HEAP tables are (the only one type of)
> > temporary tables.
>
> Temporary tables may have type HEAP.
>
> > I tried
> >
> > CREATE TEMPORARY TABLE temp TYPE= InnoDB SELECT * FROM relations;
> > or
> > CREATE TEMPORARY TABLE temp TYPE= HEAP SELECT * FROM relations;
> >
> > and they are all created as  in-memory tables no files are created.
> > Can I use any table format (ISAM,MYISAM,BDB,InnoDB,HEAP) for temporary
> > tables
>
> You can use MyISAM, ISAM, MERGE, HEAP, InnoDB.
> Temporary table files are created in the temporary directory:
>       http://www.mysql.com/doc/en/Temporary_files.html
>
> > If, so what would be the difference between a temporary table in general
> > and a HEAP table ?
>
> Temporary tables are the per-connection tables.
> HEAP tables are stored in memory tables.
>
>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
>        <___/   www.mysql.com

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to