List:General Discussion« Previous MessageNext Message »
From:Jon Drukman Date:June 24 1999 10:19pm
Subject:Re: adding data is slow
View as plain text  
At 05:15 AM 6/24/99 , Sasha Pachev wrote:
>> Dropping the indexes and recreating them after import is not a good
>> solution as it takes about an hour to rebuild each index.
>> 
>> Selects are actually quite quick - it's just importing.  Is there any way
>> to speed it up?
>> 
>
>Drop all indeces before you import, then add them back when you are
>done.

thanks for responding.  in my original message (quoted above) i said that
creating indexes is too time-consuming.

i did what you suggested though, and you are right - it only takes a few
seconds to import the data when there are no indexes.  unfortunately i need
the indexes!

recreating them afterwards is incredibly slow.  as you can see from this
mysqladmin processlist output:

+-----+------+-----------+----------+-----------+------+-------------------+
---------------------------------------------+
| Id  | User | Host      | db       | Command   | Time | State
| Info                                        |
+-----+------+-----------+----------+-----------+------+-------------------+
---------------------------------------------+
| 147 | jsd  | localhost | pageview | Query     | 3279 | copy to tmp table
| alter table pageview add index urlidx (url) |
| 155 | jsd  | localhost |          | Processes | 0    |
|                                             |
+-----+------+-----------+----------+-----------+------+-------------------+
---------------------------------------------+

it's been running for almost an hour now and there is no end in sight.  and
i need to do this for two indexes!  there's no way i can keep adding and
removing the indexes every day.  surely there has to be a way to speed up
indexing.  i am running mysqld with key_buffer=20M.


Jon Drukman
Director Of Technology
GameSpot
Thread
adding data is slowJon Drukman24 Jun
  • Re: adding data is slowSasha Pachev24 Jun
    • Re: adding data is slowJon Drukman25 Jun
      • Re: adding data is slowBenjamin Pflugmann25 Jun
        • Re: adding data is slowJon Drukman25 Jun
        • Yet Another Optimization QuestionJon Drukman28 Jun
  • Re: adding data is slowDaniel Koch25 Jun
  • adding data is slowMichael Widenius29 Jun
Re: Yet Another Optimization QuestionKevin Smith29 Jun
Re: Yet Another Optimization QuestionJon Drukman29 Jun
  • Re: Yet Another Optimization QuestionBenjamin Pflugmann30 Jun
    • Re: Yet Another Optimization QuestionJon Drukman30 Jun
Re: Yet Another Optimization QuestionKevin Smith29 Jun
Re: Yet Another Optimization QuestionJon Drukman29 Jun
  • Re: Yet Another Optimization QuestionTõnu Samuel29 Jun
    • Re: Yet Another Optimization QuestionJon Drukman29 Jun
      • Re: Yet Another Optimization QuestionMichael Widenius30 Jun
        • Re: Yet Another Optimization QuestionJon Drukman30 Jun
RE: Yet Another Optimization QuestionNigel Parker30 Jun
  • RE: Yet Another Optimization QuestionMichael Widenius30 Jun
Re: Yet Another Optimization Question(David Sklar)1 Jul
RE: Yet Another Optimization Questiontony2 Jul
  • RE: Yet Another Optimization QuestionMichael Widenius2 Jul
  • slow joinsJon Drukman7 Oct