On Thu, Jun 14, 2001 at 11:31:32AM -0400, Robin Senior wrote:
>
> Just kidding! But it seems that way...
>
> Indexing a 7 million row VARCHAR(255) table took ~12 minutes on my Athlon
> 1.33Ghz w/512MB.
> Indexing a 77 million row VARCHAR(255) table has taken 9 DAYS, and still
> hasn't finished.
>
> Obviously this isn't a linearly scaling operation, but it is seeming
> dang near exponential at the moment.
>
> Does anyone have any experience with this? Should it be taking this
> long? MySQL rips through the first few million rows, but after that
> it seems to slow to a near halt.
I have a few comments and questions:
(1) Is this a unique index? If not, consider doing a partial index
on the column. Index the first 32 characters or so. I'll save a
lot of disk I/O, memory, and CPU time but still yeild pretty
good results (depending on your data, of course).
(2) What are your key_buffer and record_buffer set to? I believe
that when MySQL is doing serious scanning (as needed in building
an index), a larger record_buffer will help.
(3) Try running `vmstat 5' on the box for a bit. Is the CPU pegged?
Is it I/O bound? Is it swapping at all?
> Please don't tell me this will take twice the age of the universe to
> finish...
How about 1/2 the age of the universe. But since there's still a fair
amount of debate over the true age of the universe, I probably haven't
helped much, have I? :-)
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 19 days, processed 136,385,255 queries (79/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