MySQL Database Optimization for Large Volumes of Repeating Data
I'm building a medium sized (100,000 entries) table in MySQL, and I'm
trying to optimize it for speed. The entries contain some data that is
transactional in nature, this data will obviously be kept in MySQL. The
remainder of the data will not change over the life of the table nor is it
well suited to a table format (i.e. some entries will contain fields that
other entries will not, leading to a lot of 'null' values). Further, much
of the data in this second part will repeat, meaning that there may only
be 500-1000 unique sets of data which are then paired with the entries in
the table.
I'm considering three ways of organizing the data. 1) Leave all the data
in MySQL in table format. 2) Serialize the non-unique data and save that
data in a single MySQL field. 3) Serialize the non-unique data and save to
a file in the hard disk, referenced by a pointer in the MySQL table.
My question is which format would you recommend and why? Which is going to
be fastest, given that I will be running many queries on the database?
No comments:
Post a Comment