On Fri, Jun 15, 2001 at 10:03:57PM -0500, Dan Nelson wrote:
> 
> 30 seconds of cscope browsing on the mysql source shows the follwing
> comments right before calls to create_tmp_table():
> 
> /* Create a tmp table if distinct or if the sort is too complicated */
> /* group data to new table */
> 
> So I'd say Mysql will use temp tables on GROUP BY, DISTINCT, and
> probably ORDER BY queries that mysql cannot satisfy with the same
> index the optimizer picked.
> 
> The need_tmp flag is passed to the describe function, so any query
> that requires a temp table should also have "Using temporary" in its
> explain plan.

Ah, thanks. The funny thing is that I *did* think to check the source
code for a different problem I ran into severl minutes later.

I'll have to poke at this some more. I just restarted with a 64MB
maximum and one of my more common queries is still "Using
temporary". I find it difficult to believe that I'm pulling enough
data to fill a 64MB table. The entire dataset is about 6 times that
size, and I know I'm not pulling even close to 1/6th of the data.

Hmm... More playing required...

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878    Fax: (408) 349-5454    Cell: (408) 439-9951

MySQL 3.23.29: up 0 days, processed 2,435 queries (13/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to