Hi, i have a very large table which is currently approx 70M rows and growing daily by the thousands , this schema is tipping over every day now so i'm moving to a partitioned table and redesigning the ddl .
the table is basicly a collection of NOT NULL INTEGERS(some medium some INT some tiny) which need to have a unique constraint for a set of 7 columns (the are more columns in the table) this is very expensive to compute per insert and increases the index file size very much further more since i never retrieve by it i would prefer to drop it and somehow md5/maybe simple concat the values... don't know yet .
the problem is that the only column type that can hold such a large unique number is a varchar i'm questioning whether or not this PK will actually be better ? allso since i will have a PRIMARY KEY 'part_key' (site_id,id) i will have to take the unique constraint in the designing of the partition , to summarize ... i'm sure this is not a new problem but i wasn't able to find any benchmarks/documents comparing the two , does anyone have any experience with this problem ? the question is realy should the PK be the whole 8 fields (keep in mind this table will probably have more then 100M rows) when i'm not ever retrieving by the pk or just a hashed value of the unique fields P.S : retrieving is mainly done by two out of the 7 columns Disk size is not an issue thanks .