Practical task
An SQL query on 80 million messages creates duplicates after JOIN. Which action is best to start first?
- Check the cardinality of the JOIN, keys, and execution plan before optimization.
- Create an index on one join field.
- Export the result to CSV and remove duplicates in Python.
- Always add DISTINCT to all columns.
- Add DISTINCT after verifying the result on a sample.
- Check the join keys and the uniqueness of both tables.