>I it seems that slowness is caused by grouping by column
>
> exchrate numeric(13,8)
exchrate has different values in few rows.
It has usually value 0
In this sample query it is always 0.
I tried not change exchrate with
nullif( bilkaib.EXCHRATE,0)
but this does not up speed query, no idea why.
Andrus.