This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
Kovacs Akos wrote:Filtering with more precise conditions is very important. It was the only solution.
That's right. "Duplicate" rows are often an indication that your selection or join conditions are incorrect or incomplete. If you find yourself using DISTINCT to eliminate duplicates, you should instead look at your query to find out why it's returning duplicates in the first place. If you use DISTINCT, you are actually telling your database to fetch a lot of data you don't really need, then "flatten" it to eliminate the unnecessary duplicates. This creates unnecessary work for the database and can cause performance problems if your query is generating a lot of duplicates, so obviously it's better to avoid this if possible.
PS: I gave you a cow for coming back here to share your learning experience!
No more Blub for me, thank you, Vicar.
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad: