1. A system for optimizing execution of a query expression on a database engine of a database server, comprising: a database engine on a database server for receiving the query expression with a plurality of query language elements; an evaluation counter module within the database engine, wherein the evaluation counter module increments an evaluation counter value corresponding to a query language element result; a flag within the database engine, wherein the flag is configured to be set in the database engine when the evaluation counter value reaches a threshold value; and a query processor within the database engine, wherein the query processor is configured to evaluate the efficiency of the query language elements in the query expression after the flag is set by comparing the evaluation counter value for each query language element against a set of optimization criteria.