Does the Optimizer evaluate the avergae only one time, or two times?
SELECT AVG(col1), 1/AVG(col1) FROM table
Thanks
Does the Optimizer evaluate the avergae only one time, or two times?
SELECT AVG(col1), 1/AVG(col1) FROM table
Thanks
I wouldn't worry about it. Even if mySqueal computes it twice, it will make only one pass over the data as most aggregates are computed in one pass - and it's reading in the data that takes the time, so you want that to happen just once.