Impact of embedded functions on query optimization