본문 바로가기

Mysql36

Mariadb like underscore 우리 팀 막내가 동일 고객 이메일로 조회할 때, 데이터가 두 개가 나온다고 말해줬다. 이메일 내용을 보니, 언더스코어 문제여서 찾아서 알려줌. SELECT * FROM schema.dbname WHERE email like 'te\_st@gmail.com%'; https://www.mariadbtutorial.com/mariadb-basics/mariadb-like/ MariaDB Like In this tutorial, you will learn how to use the MariaDB like operator to search for strings that match a specific pattern. www.mariadbtutorial.com 다른 특수문자로 하고 싶으면 위에 참고 사이트 들어가서 .. 2021. 9. 23.
Mysql Join Update 파트너 환율 관련하여 모니터링 하는 시스템이 있는데 쿼리가 두 번 호출되는 상황이라 개선해서 적용함. UPDATE 환경설정 AS config LEFT OUTER JOIN ( SELECT * FROM 파트너 GROUP BY ..... ) AS partner ON config.국가 = partner.국가 AND config.파트너 = partner.파트너 AND 파트너.enable = 'Y' SET config.활성화 = IF(partner.파트너 IS NULL, false, true); #WHERE 2021. 9. 16.
Mariadb파티션 생성 시간 체크 인텔 제온 cpu e5-2623 v4 DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS" version : 10.1.37-MariaDB-1~xenial 대충 이런 테이블. create table t_tablename_history ( idx bigint auto_increment, update_date date not null, update_time datetime not null, seq bigint not null, transaction_id varchar(36) not null, transaction_tx_id varchar(36) not null, tx_type .. 2021. 5. 6.
Mariadb file format [42000][1118] (conn=128) Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. 상용서버에 있는 데이터베이스를 개발서버로 옮기는 작업이 있어서 복원 하는 도중 나타난 오류. 레코드 길이가 너무 기니깐. TEXT로 변경하던 블롭으로 변경해줄래? 라는 권유. CHAR나 VARCHAR가 1000이상 되는 항목들을 다 변경해주면 된다. 그게 싫다면 아래와 같은 행동을 하면 된다. 리눅스에 접속해서 다음과 같이 변경해주면 된다. [mysqld] innodb_strict_mode = 0 SHOW VAR.. 2021. 4. 5.