database/sql

count(*) 와 count(col) 속도 비교

아르르르를를르 2020. 1. 17. 10:45

1. select count(*) from db1

2. select count(col1) from db1

중에서 2가 더 느리다. 2에서는 null check가 일어나기 때문이다.

'database > sql' 카테고리의 다른 글

each method each connection?  (0) 2021.11.18
mysql server has gone away  (0) 2020.08.05
tinyInt(1) 과 tinyInt(2) 차이  (0) 2020.07.07
column유형  (0) 2020.03.12
process 관련 명령어  (0) 2020.01.20