Support query statement reusing.