You now have until September 15th to submit your use case or success story to the 2022 Dataiku Frontrunner Awards!ENTER YOUR SUBMISSION

Use group by instead of distinct

0 Kudos

Several recipes conveniently provide the ability to select distinct on their outputs, but this is highly inefficient in most databases. The same result can usually be achieved much faster by grouping by all the columns. Ideally, when the distinct option is selected in recipes, the resulting sql will prefer group by to distinct, at least in databases where group by is strictly better.