My table has 981 million rows and is about 30GB large. It is six columns: ID, Ticker, Date, Time, Price, Volume. The data was in text files and using LOAD DATA INFILE was actually quite painless and only took a couple hours. However, each select statement takes 5 minutes now because of the number of rows.
I want to create an index on Ticker, Date, Time. I used the following command:
create index tickerdatetime on kibot (Ticker,Date,Time);
It is now been over eight hours and it is still working. My machine is ok (PC, 3.40GHz, quad core, 12GB RAM). Two questions:
- Is there a better (ie faster) way of doing this?
- Is there any way I can know what percentage is done? Am I 10% done or 80% done?