Fixed sql query plan.

Removed commented code
Merge branch 'develop' of github.com:Starcounter/Starcounter into develop