This thesis explored the design space of instance-specific optimizations. We, first, explored the space manually and found points with improved performance. Afterward, we used a domain-specific language to simplify and automate the exploration process. Finally, we described a prototype that explores the space of possible optimizations, while the query is running.