use primary index for state queries with instanceId