January 5, 2024 at 12:00 am
Comments posted to this topic are about the item High Cardinality
January 5, 2024 at 11:09 am
ROFL ...."Lost of different values, with the counts not mattering"
I'm a bit surprised to find that a unique column doesn't have "High Cardinality"
January 5, 2024 at 5:31 pm
Same here. I thought there were two viable answers here.
-- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
January 5, 2024 at 6:53 pm
@graham.hitchings - A unique column will have high cardinality too based on the link in the QOTD. It states:
An example of a data table column with high-cardinality would be a USERS table with a column named USER_ID. This column would contain unique values of 1-n. Each time a new user is created in the USERS table, a new number would be created in the USER_ID column to identify them uniquely. Since the values held in the USER_ID column are unique, this column's cardinality type would be referred to as high-cardinality.
The reason why "all values are unique" isn't the right answer is because that isn't the definition of "high cardinality". It would be a situation of high cardinality, but if that was the answer, then having a table with 1 million records and 2 duplicates in the column would NOT fall under high cardinality.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply