Update query to version which only creates a single data store per connection