# SQLite에서는 작은 쿼리 수백개도 효율적

> Clean Markdown view of GeekNews topic #3751. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=3751](https://news.hada.io/topic?id=3751)
- GeekNews Markdown: [https://news.hada.io/topic/3751.md](https://news.hada.io/topic/3751.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-02-17T09:56:47+09:00
- Updated: 2021-02-17T09:56:47+09:00
- Original source: [sqlite.org](https://sqlite.org/np1queryprob.html)
- Points: 9
- Comments: 2

## Topic Body

- 웹페이지 하나 표시하는데 200개의 SQL문장을 쓴다면 MySQL,PostgreSQL 같은 기존 C/S DB에겐 과도함

- SQLite에서는 200개 이상의 쿼리도 별 문제 없음

ㅤ→ 복잡하고 큰 쿼리도 잘 효율적으로 실행하지만, 작은 쿼리가 많아도 효율적

ㅤ→ SQLite는 Client/Server 방식이 아니고 프로세스내에서 함수호출하는 방식이기에 N+1 Query Problem이 적용되지 않음

- SQLite의 소스 타임라인을 표시하는 동적 웹페이지에서 사용하는 실제 SQL 문장 240여개를 볼 수 있음

## Comments



### Comment 4481

- Author: galadbran
- Created: 2021-02-17T10:21:14+09:00
- Points: 2

요약 내용 정정 필요한 부분이 있어서요. “sqlite 는 클라이언트 서버 방식이 아니라 프로세스 내에서 발생하는 함수 호출이기 때문에 n+1 현상이 발생해도 문제가 아니다” 라고 설명하고 있네요.

### Comment 4482

- Author: xguru
- Created: 2021-02-17T10:42:38+09:00
- Points: 3
- Parent comment: 4481
- Depth: 1

아이고 "아니" 어디갔나요 ㅠㅠ 마구 쓰다가 삭제되었나봐요. 수정해두었습니다.
