I’m in the process of downloading and creating database files of a whole heap of historical Major League Baseball data. We’re talking a lot of data here.
There is a table containing basic data for all games since 1871, which contains about 190,000 rows. But the biggest set of data contains play-by-play details for just about every MLB game since 1957. I’ve only imported the period 1957-1969 into the database so far, but already it’s up to around 1.5 millions rows. Adding 1970 through 2006 is probably going to take it to well over 6 million rows.
This leaves me with some questions about access, storage, and performance. I’m still pretty much a newbie with MySQL, so i was hoping to get some tips and advice.
First, the data in my database is currently stored on my C: drive in the default MySQL location: C:\Program Files\MySQL\MySQL Server 5.0\data. The total size of the data is currently around 800Mb, so i’m anticipating that the final size, once all my data is imported, will be somewhere around 4Gb, possibly greater.
Now, my computer’s hard drives are partitioned such that the C: drive is mainly for Windows and program files. There is some free space there, but i’d prefer not to fill it with a 4+ gigabyte database file. I like to leave spare space to allow for defragging, and to ensure that the system doesn’t slow down.
So i’d like to move the data to another partition, preferably on another actual hard drive. But, despite some searching, i haven’t been able to find a straightforward set of instructions for doing this. It’s not like MS Access where you can just move a self-contained database file; in MySQL (if i understand it correctly) you have to move the data, and also tell MySQL where to look for it when you open the program. If anyone could help me find some instructions that would tell me how to move my database to (for example) M:\baseball\data, i’d be most appreciative.
In a related matter, i’m also wondering about making the database available to a version of MySQL running on my Linux installation. I know that MySQL will run on multiple platforms, but can instances of MySQL on multiple platforms read from and write to the same database files? That is, if i place my data on a FAT32 partition (so that both Windows and Linux can read and write), can MySQL from both operating systems use the same data files?
Also, FAT32 has a maximum file size of 4Gb, but MySQL seems to keep all its data in one large file. Currently, all my data appears to be contained in a file called ibdata1. As i said earlier, this file is likely to end up larger than 4Gb. Is there any way around this? Can MySQL, for example, split the data file into multiple smaller files, rather than one huge file? Or am i going to have to keep it on NTFS for Windows, and put a separate file on an EXT3 partition for Ubuntu?
And any other advice is welcome. Thanks.