Ability to set performance options for queries

This adds the ability to set performance options for queries. 

This PR is build on top of the changes for the previous PR.

This closes #6.