본문 바로가기

library

(9)
WAL 모드 2018년 WAL모드에 대해 처음 알았고 시도를 했다. 성능을 떠나 당시엔 안정성이 문제였다. 시스템 또는 앱의 비정상 종료시 sqlite db 파일이 깨지는 현상이 많이 발생했다. 그래서 쓰지 않았다. 그리고 이번에 다시 시도해본다. https://www.koreascience.or.kr/article/CFKO201529368418394.pdf
문자열 쿼리시 대소문자가 맞지 않아 부하 발생 [collate nocase] 지나고 보니 이런 바보같은? 그런데 당시엔 몰랐던 collate nocase 특정 고객사에서 sqlite query 부하가 발생해 이유를 찾아보니 query 문에 collate nocase가 빠져 있었다. => 해당 index는 collcate nocase로 생성됐다. 해당 고객사엔 그 column의 개수의 입력이 무지무지 많은데 대소문자가 안 맞아 table full scan 발생. 근본적인 해결책을 위해 sqlite build시 문자열 처리 기본값을 collate nocase로 할 순 없을까 찾아보니 없다. https://www.sqlite.org/compile.html Compile-time Options For most purposes, SQLite can be built just fine usi..
sqlite + json 이때 쯤이라면 sqlite에 json을 쓸 수 있지 않을까 찾아보니 매우 매우 재미있는 내용이 있습니다. https://www.sqlite.org/json1.html The "1" at the end of the name for the json1 extension is deliberate. The designers anticipate that there will be future incompatible JSON extensions building upon the lessons learned from json1. Once sufficient experience is gained, some kind of JSON extension might be folded into the SQLite core. For n..
sqlite3 에서 datetime, timestamp 중 뭘 쓸까? 테이블을 새로 만들다보니 datetime, timestamp 2가지 형태 중 무엇을 쓰는게 좋은가 라는 생각이 든다. 그래서 찾아보니 결론은 timestamp. MySQL Datetime, Timestamp 차이에 대해 MySQL Datetime, Timestamp 차이에 대해 MySQL의 Time Zone을 확인해보자. mysql> show variables like '%time_zone%'; +------------------+---------------------+ | Variable_name | Value | +------------------+---------------------+ | system_time_zone | nesoy.github.io
gossip protocol, hashgraph 카산드라에 대해 보던 중 발견하게 된 프로토콜. 가십(gossip) 프로토콜은 클러스터에 있는 노드 간에 정보를 공유하는 프로토콜이다. 마치 바이러스가 퍼지는 방식과 유사하게 동작하기 때문에 '전염병 프로토콜'(epidemic protocol)이라고도 불린다.[1] 세상엔 참 재미있는 것들이 많다. 가십프로토콜 wiki.hash.kr/index.php/%EA%B0%80%EC%8B%AD 헤데라 해시그래프 wiki.hash.kr/index.php/%ED%95%B4%EC%8B%9C%EA%B7%B8%EB%9E%98%ED%94%84
아파치 카산드라와 호환되지만 10배 빠른 ScyllaDB 레드판다 github를 보다 알게 됐습니다. ScyllaDB | The Real-Time Big Data Database Scylla is a drop-in Apache Cassandra alternative big data database that powers applications with ultra-low latency and extremely high throughput. Scale-up distributed database performance of 1,000,000 IOPS per node, scale-out to hundreds of nodes and 99% l www.scylladb.com Scylla (database) - Wikipedia Scylla is an open-source d..
Kafka 호환되면서 더 좋다는 RedPanda 판다. 레드판다.. 왠지 중국에서 만든게 아닐까 생각이 드는 이름입니다. 중국이 워낙 인구가 많다보니 대용량 처리에 더 앞서가는 느낌도 있고요. A modern streaming platform for mission critical workloads Redpanda is a Kafka® compatible event streaming platform. No Zookeeper®, no JVM, and no code changes required. Use all your favorite open source tooling - 10x faster. 10배 빠르답니다. Redpanda is a Kafka® compatible event streaming platform. No Zookeeper®, no JVM,..
Insert or Replace CouchBase를 쓸 때 Upsert 라는 구문이 있었습니다. Insert or update의 합쳐진 말로 해당 키가 있으면 update, 없으면 insert를 한다는 거죠. 이게 참 편합니다. 안그러면 select 한 후 있으면 udpate 없으면 insert 이렇게 2단계를 거치니까요. sqlite에서 이런 기능이 생겼습니다. INSERT OR REPLACE INTO table(column_list) VALUES(value_list); 또는 간단히 REPLACE INTO table(column_list) VALUES(value_list); SQLite REPLACE: Insert or Replace The Existing Row In this tutorial, you will learn how to..