전체 글 108

[MySQL] Group Replication

# Linux version : 5.15.0-3.60.5.1.el9uek.aarch64# mysql version : 9.1.0-commercial  # 10.0.2.10 cluster1# 10.0.2.20 cluster2# 10.0.2.30 cluster3# cluster1,cluster2,cluster3에 mysql이 설치 및 실행되어있다고 가정하고 진행[root@localhost ~]# vi /etc/hosts10.0.2.10 cluster110.0.2.20 cluster210.0.2.30 cluster3[root@localhost ~]# mysql -ivh mysql-router-commercial-9.1.0-1.1.el9.aarch64.rpm mysql-shell-commercial-9.1.0-..

MySQL 2025.01.12

[MySQL] MySQL 성능 분석 프로시저

// 인자로 주어진 쿼리 다이제스트에 대해 Performance 스키마에서 수집된 정보의 통계 데이터를 얻고 싶은 쿼리 다이제스트 값을 입력한다.sys.ps_trace_statement_digest MySQL :: MySQL 8.4 Reference Manual :: 30.4.4.22 The ps_trace_statement_digest() Procedure30.4.4.22 The ps_trace_statement_digest() Procedure Traces all Performance Schema instrumentation for a specific statement digest. If you find a statement of interest within the Performance Schema ..

MySQL 2025.01.12

[SQLP] SQL SERVER 쿼리 힌트

-- 테이블 FULL 스캔하도록하는 힌트select * from test.emp with(index(0));실행계획select * from test.emp with(index(0))  |--Clustered Index Scan(OBJECT:([master].[TEST].[EMP].[EMP_PK])) -- EMP_PK : EMPNO-- pk 인덱스를 타게하는 힌트select * from test.emp e with(index(1)) where empno = 100; -- 테스트상 pk가 1번select * from test.emp e with(index=emp_pk) where empno = 100;select * from test.emp e with(index(emp_pk)) where empno = 1..

ETC 2024.12.29

[OS/macOS] WARN[0486] [hostagent] guest agent events closed unexpectedly error="rpc error: code = Unavailable desc = connection error: desc ...

// LIMA 1.0.1 업그레이드 후 에러 떴던 것 같음.// limactl create vm 후 limactl start 수행 중 에러 뜸.// INFO[0486] [hostagent] Forwarding "/run/lima-guestagent.sock" (guest) to "/your_lima_vm_directory/ga.sock" (host)// WARN[0486] [hostagent] guest agent events closed unexpectedly  error="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /your_lima_vm_directory..

OS/macOS 2024.12.24

[OS/macOS] FATA[0000] sudoers file "/private/etc/sudoers.d/lima" is out of sync and must be regenerated...

// socket_vmnet 업그레이드(1.1.4 -> 1.1.7) 후 FATA 에러 뜸.// FATA[0000] sudoers file "/private/etc/sudoers.d/lima" is out of sync and must be regenerated (Hint: run `limactl sudoers >etc_sudoers.d_lima && sudo install -o root etc_sudoers.d_lima "/private/etc/sudoers.d/lima"`)) $ vi /private/etc/sudoers.d/lima%everyone ALL= ...# Manage "bridged" network daemons%everyone ALL=(root:test) NOPASSWD:NOSETENV:..

OS/macOS 2024.12.24

[OS/macOS] FATA[0000] networks.yaml field `paths.socketVMNet` error: file "/opt/homebrew/.../bin/socket_vmnet" is not owned by "root" ...

// LIMA 1.0.1 upgrade 후 FATA 에러 발생 // vm 실행시키려고 하니까 FATA[0000] networks.yaml field `paths.socketVMNet` ... 에러 뜸.$ limactl start defaultINFO[0000] Using the existing instance "default"FATA[0000] networks.yaml field `paths.socketVMNet` error: file "/opt/homebrew/.../bin/socket_vmnet" is not owned by "root" ... // limactl list 확인 // networks의 shared가 정의 안되어있다고 함. (~/.lima/_config/networks.yaml을 못 읽..

OS/macOS 2024.12.24

[MySQL] 모니터링 쿼리

// 스크립트 파일명에 '+' 는 필수, '-' 는 옵션 조건  # bfpLoadRate-db-tab.sql// buffer pool에 몇 퍼센트의 테이블(인덱스 포함)이 캐시되어있는지 확인. // ※ MySQL에서 제공하는 n_cached_pages 자체가 정확하지 않음.selecttable_name,n_cached_pages,total_pages,round((n_cached_pages/total_pages)*100,2) as "cached_pct(%)"from (selecti.name as table_name,i.n_cached_pages,#t.data_length,#t.index_length,#t.data_free,((t.data_length + t.index_length - t.data_free)..

MySQL 2024.12.21