[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-win32
Subject:    mysql-win32: Using temporary tables
From:       Michael Widenius <monty () monty ! pp ! sci ! fi>
Date:       1998-09-28 10:40:47
[Download RAW message or body]

> > > > > "Administrator" == Administrator  <tinduc@hcm.vnn.vn> writes:

Administrator> Hi, 
Administrator> I'm using mySQL win 32 version 3.22.4. I want to use temporary tables \
that are stored on disk. I have tried these ways :

Administrator> 1/ In mysqld, I set options : --big-tables and --tmp-dir =...
Administrator> 2/ Set option SQL_BIG_TABLES =1

Administrator> but I can't find out any temporary SQL tables in temp directory. So, I \
will appreciate very much if anyone could tell me details about:

Administrator> 1. Which Select queries will create temporary SQL tables that are not \
hidden and have a name that starts with SQL_. Administrator> 2. Using temporary \
tables.  
Temporary files are created as windows temporary files and I don't 
think they show up with dir.  (They are created with the O_SHORT_LIVED 
attribute).

Temporary SQL tables should show up in the tmpdir (mysqladmin
variables) directory.

If you use GROUP BY followed by ORDER BY on different items or if you
use more than one table in the GROUP BY or ORDER BY part then MySQL
has to use a temporary table

Temporary tables are also created for some specific queries that uses
GROUP BY or ORDER BY on some table that is not used first (after the
join optimizer) in the JOIN.  Check with EXPLAIN and if any table in
ORDER BY or GROUP BY is not the first not-const table then MySQL will
use a temporary table.

MySQL will also in some context use temporary tables when using DISTINCT.

Regards,
Monty
-----------------------------------------------------------
Send a mail to mdomo@tcx.se with
unsubscribe mysql-win32 your@subscription.address
in the body of the message to unsubscribe from this list.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic