팁
가장 rows가 많은 테이블을 먼저 배치해라(쿼리 옵티마이저)
INNER JOIN
- 원래 아는 그거
OUTER JOIN
SELF JOIN
SELECT p.name AS parent, c.name AS child
FROM tree c, tree p
WHERE …
가장 rows가 많은 테이블을 먼저 배치해라(쿼리 옵티마이저)
SELECT p.name AS parent, c.name AS child
FROM tree c, tree p
WHERE …
docker-compose up -d docker exec -it mysql_sample bash cd usr/src/test_db mysql -uroot -pMyPassword -t < employees.sql
read moreA stored routine is either a procedure or a function. A procedure is invoked using a CALL statement and can only pass back values using output variables. A function can be called from inside a statement just like any other function and can return a scalar value.
read moreSHOW VARIABLES LIKE '%COMMIT%'
autocommit ON <- 여기
binlog_group_commit_sync_delay 0
binlog_group_commit_sync_no_delay_count 0
binlog_order_commits ON
innodb_api_bk_commit_interval 5
innodb_commit_concurrency 0
innodb_flush_log_at_trx_commit 1
original_commit_timestamp 36028797018963968
START TRANSACTION …
UNION
은 두 쿼리의 결과에서 중복되는 값을 삭제하여 나타냅니다.
UNION ALL
은 두 쿼리의 결과에서 중복되는 값을 모두 …