====== MySQL JSON ====== * [[https://dev.mysql.com/doc/refman/5.7/en/json.html|MySQL :: MySQL 5.7 Reference Manual :: 11.6 The JSON Data Type]] ===== 성능 / Performance ===== * [[https://medium.com/daangn/json-vs-text-c2c1448b8b1f|MySQL JSON vs. TEXT. JSON 타입 컬럼으로 저장하는 것이 좋을까요 ?  TEXT타입 컬럼이… | by Sunguck Lee | 당근마켓 팀블로그 | Aug, 2022 | Medium]] * 대체로 JSON 데이터를 통으로 읽고 통으로 저장하는 경우에는 TEXT가 유리하다. MySQL 서버에서 JSON 파싱을 하지 않기 때문에. 하지만 정합성 보장은 당연히 안 된다. * JSON 의 특정 필드들에 대해 조회하고, 업데이트하고 조회 조건으로 거는 경우에는 JSON 컬럼으로 지정하는게 좋다. 다만 통으로 데이터를 읽을 때 JSON 파싱 과정을 거치면서 성능저하가 생긴다. ===== 참조 ===== * [[http://mysqldba.tistory.com/278|MySQL DBA를 위한 :: MySQL Ver. 5.7 JSON 데이터 사용하기]] * [[https://www.slideshare.net/LeeIGoo/mysql-57-nf-json-datatype|MySQL 5.7 NF – JSON Datatype 활용]] * [[https://scotch.io/tutorials/working-with-json-in-mysql|Working with JSON in MySQL ― Scotch.io]] * [[http://www.mysqltutorial.org/mysql-json/|A Practical Guide to MySQL JSON Data Type By Example]] * [[https://database.guide/json_search-find-the-path-to-a-string-in-a-json-document-in-mysql/|JSON_SEARCH() – Find the Path to a String in a JSON Document in MySQL | Database.Guide]] * [[https://database.guide/json_extract-return-data-from-a-json-document-in-mysql/|JSON_EXTRACT() – Return Data from a JSON Document in MySQL | Database.Guide]] * [[https://www.joinc.co.kr/w/man/12/mysql/json|Mysql JSON - SELECT, INSERT, UPDATE, 색인]]