인프라 제한으로 인해 Cassandra 실행 버전을 2.2 이상으로 업그레이드 할 수 없으므로 2.0.7을 사용해야합니다. 이 버전은 불행히도 UNSET
의 사용을 지원하지 않습니다. 우리가 작성한 데이터는 null 허용 열을 가지고 있기 때문에, 우리는 null
이라는 자체 개념 (즉, 빈 문자열, 빈 데이터 구조)을 만들거나 여러 개의 PreparedStatements (동일한 쿼리를 만들지 만 null
값이 포함되어 있으므로 null
을 Prepared Statement에 바인딩하지 않으려합니다.Cassandra Nullable 열에 대해 여러 개의 준비된 문
카산드라 지금 13:13:28.679 [cluster1-worker-5] WARN com.datastax.driver.core.Cluster - Re-preparing already prepared query. Please note that preparing the same query more than once is generally an anti-pattern and will likely affect performance. Consider preparing the statement only once.
이 시나리오에서 가장 좋은 해결 방법은 무엇입니까를 던지고있다? 대부분의 가이드는 단순히 UNSET
:(를 사용하여 우리에게 말하고있다.
, 그것은 ' 당신이 같은 쿼리를 여러 번 준비하고 있기 때문에 경고합니다. –
이 기사의 해결 방법은 도움이 될 수 있습니다 http://thelastpickle.com/blog/2016/09/15/Null-bindings-on-prepared-statements-and- 원하지 않는 - 삭제 표시 - creation.html –