Hello! I am wondering, if no fields in a query are...
# general
g
Hello! I am wondering, if no fields in a query are aggregated, then is there an advantage to using 
distinct
 over grouping by all the fields? For example, is there a difference in efficiency between these two?
select distinct species, name from dataSource
 
select species, name from dataSource group by species, name
they look to be comparable when I run each in the query console
m
I think the second one might be rewritten as the first one internally
@User ^^
g
Ok gotcha. so using
distinct
is more efficient internally? but from our perspective it doesn’t matter.
m
I think internally the group-by is only for aggregation queries, so there's nothing to compare against.
g
Alright, thanks!
k
please use distinct for now, we have some cool enhancements coming that will be applicable to distinct
g
Ok great!
@User ^^ I’ll leave it as distinct
👍 1