Switch query execution to using lazily initialized prepared statements