Re: How long does indexing via ALTER TABLE take? Axel Schwenke wrote:
> John Nagle <nagle@animats.com> wrote:
>>>>The ALTER TABLE has been running for about 30 hours now.
>>>>About how long should that take?
> You should configure key_buffer to 25-50% of your memory and
> myisam_sort_buffer to approx. half that size. If you intend to add
> a lot of indexes, you can even temporarily make myisam_sort_buffer
> the bigger setting. This will greatly increase performance of
> indexing operations.
>
> For 15.000.000 rows with a BIGINT sort column you will need
> (8 Byte (BIGINT) + 4 Byte (row pointer)) * 15.000.000 = 180MB
> sort buffer to do the sorting in memory. This should finish in
> few minutes then.
I'll definitely reconfigure for next time. Thanks.
The ALTER TABLE finally finished successfully after 32 hours.
John Nagle |