- 웹로그 분석 성능 테스트
- CPU: 인텔 제온 E5-2687W v3 3.10GHz 2소켓 (물리 20코어)
- MEM: 128GB
- OS: CentOS Linux release 7.2.1511 (Core)
- 1998년 월드컵 웹로그 공개 데이터셋
- 123GB, Common Log Format 텍스트 파일 기준
- 13억 5276만 7896건
- 단일 사용자 쿼리
- 테이블 풀스캔 시나리오 - 13.5억건 전체 통계
- snappy 압축, 컬럼 레이아웃, 인덱스 없음
- 전체 데이터 인메모리 캐싱
- 정규화 필드 적재 - 17.29GB (7.1배 압축)
- 정규화 필드 + 원본 필드 적재 - 42.58GB (2.9배 압축)

1. 페이지뷰 총계
table wc | stats count
- 1회차: 3.741초
- 2회차: 4.271초
- 3회차: 3.813초

2. 일자별 페이지뷰 통계
table wc | timechart span=1d count
- 1회차: 7.034초
- 2회차: 6.974초
- 3회차: 6.891초

table wc | timechart span=1d count by method
- 1회차: 9.419초
- 2회차: 7.741초
- 3회차: 8.402초

table wc
| eval _time = datetrunc(_time, "1d")
| stats count by _time, remote_ip
| stats sum(count) as page_view, count as user_view by _time
- 1회차: 25.894초
- 2회차: 26.520초
- 3회차: 26.398초

카테시안 곱을 이용한 동질집단별 잔존율 분석으로, 88일에 걸친 사이트 유입 후 잔존율을 하나의 쿼리로 분석합니다.
- 1회차: 57.050초
- 2회차: 59.466초
- 3회차: 58.873초
set from="19980501" | set to="19980728"
| table from=$("from") to=$("to") wc
| eval _time= datetrunc(_time, "1d")
| stats min(_time) as cohort by remote_ip
| stats count as total by cohort
| join cohort [
table from=$("from") to=$("to") wc
| eval _time= datetrunc(_time, "1d")
| stats min(_time) as first_seen, max(_time) as last_seen by remote_ip
| eval key = 1
| join key [
json "{}" | eval day=daterange(date($("from"), "yyyyMMdd"), date($("to"), "yyyyMMdd"))
| explode day | eval key = 1
]
| fields day, remote_ip, first_seen, last_seen
| eval elapsed = datediff(first_seen, day, "day"), exist = day >= first_seen and day <= last_seen
| search elapsed >= 0
| rename first_seen as cohort
| stats sum(if(exist, 1, 0)) as count, first(day) as day by cohort, elapsed
| fields cohort, elapsed, count, day
]
| eval 잔존율 = round(count * 100 / total)
| rename elapsed as 경과일수
| rename day as 경과일자
| rename cohort as 코호트그룹
| rename count as 잔존수
| rename total as 전체
| fields 코호트그룹, 경과일수, 경과일자, 잔존수, 전체, 잔존율
| rename 경과일자 as _time
| eval 코호트그룹 = string(코호트그룹, "yyyy-MM-dd")
| timechart span=1d max(잔존율) as 잔존율 by 코호트그룹


상단의 그래프로 월드컵이 개막되던 1998년 6월 10일을 기점으로 잔존율 패턴이 바뀌는 것을 확인할 수 있습니다.