I have some questions about composite primary keys and column power. I searched the Internet but could not find a definitive answer, so I try again. Questions:
Context: Large (rows 50M - 500M) Prep OLAP tables, not NOSQL, not Columnar. MySQL and DB2
1) Does the order of the keys in PK?
2) If the power of the speakers varies greatly, what should be used first. For example, if I have CLIENT / CAMPAIGN / PROGRAM, where the CLIENT is very cardinal, CAMPAIGN is moderate, PROGRAM is almost like a raster index, which order is better?
3) What is the best order for Join if there is a Where clause and when there is no Where clause (for views)
Thanks in advance.
source
share