Use insert delayed, and you will cut your time in half.  At least with my
experience.  But also how long does it actually take to run the query
itself.  Giving a summary explain doesn't help much.  You really need a
table structure that the select is using and a full explain.

Donny

> -----Original Message-----
> From: Tim Cutts [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 24, 2004 6:02 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: SLOW 22million rows, 5 hour query?
> 
> 
> On 23 Apr 2004, at 9:48 pm, [EMAIL PROTECTED] wrote:
> 
> > Relevant `explain` details:
> > Full table scan: 22,371,273 rows, Using temporary; Using filesort
> 
> The filesort is a giveaway.  Can you increase the sort buffer size so
> that the sort can happen in memory rather than having to use a file to
> sort?
> 
> Tim
> 
> --
> Dr Tim Cutts
> Informatics Systems Group
> Wellcome Trust Sanger Institute
> Hinxton, Cambridge, CB10 1SA, UK
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]




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

Reply via email to