Exception: Group by float / double would be slow


#1

For the following query:

select codcli, lat, lng, sum(qta*prz_ces) from <table> group by  codcli, lat, lng 

raises the error in object, where lat and lng are double.

What is the best practice to manage this case?

Do I have to change lat and long into a different data type?

Anyone got this simple query type, grouping by coordinates, working ?


#2

Hi,

The nature of this particular query leads to potentially a huge number of groups based on the details of two double columns.

Again watchdog is basically telling you, is this really what you want to do?

If you are confident your lats and lng are sensible to group by and will not generate hundreds of millions of groups you again could turn off watch dog and let the query run.

Many people in this situation rather than grouping by something like lat and lng they would bin the lat lng into blocks and then group by these integer buckets, but it really depends what you are trying to do.

regards


#3

Your explanations are clear, Dwayne, now I got better what is the porpoise of watchdog.

Thank you.