Optimisations done while installing query

While installing a query it is shown that it compiles and optimises the query, what kind of optimisations are done to the query while installing, do these optimisations consider the already present graph data? if yes then is there any difference between installing the query and loading the data and the other way round ?

currently, there is not relationship between the graph data and the query optimization. Only machine code level optimization is used now. Cost based optimizer will be added down the road.