Using a HQL query like this:
def accounts = Account.executeQuery("select distinct a.number from Account a")
def accountSize = accounts.size()
This gives the accountSize but the problem is that the accounts will be fetched from Hibernate as well. Is there a command that allows to compute the size of the query result without fetching the result?