Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Агрегация и обработка статистики
Search
Yehor Nazarkin
August 12, 2013
Programming
5.7k
0
Share
Агрегация и обработка статистики
Доклад Валерия Змиевского, kharkivpy #8
Yehor Nazarkin
August 12, 2013
More Decks by Yehor Nazarkin
See All by Yehor Nazarkin
Flask, гордость и предубеждения
nimnull
0
340
Python non-mainstream web
nimnull
0
170
Write once, run everywhere
nimnull
0
6.3k
GPU Computing in Python
nimnull
1
5.7k
To Flask or not to Flask
nimnull
5
640
MongoDB Без ORM
nimnull
0
320
REST in Flask (And small client-side intro)
nimnull
10
1.7k
Other Decks in Programming
See All in Programming
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
570
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
500
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
140
[RubyKaigi 2026] Require Hooks
palkan
1
200
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
810
Kingdom of the Machine
yui_knk
2
340
第3木曜LT会 #28
tinykitten
PRO
0
110
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
290
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
250
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
340
Back to the roots of date
jinroq
0
100
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
0
890
Technical Leadership for Architectural Decision Making
baasie
3
330
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
440
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
340
KATA
mclloyd
PRO
35
15k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
sira's awesome portfolio website redesign presentation
elsirapls
0
220
Designing Powerful Visuals for Engaging Learning
tmiket
1
340
Google's AI Overviews - The New Search
badams
0
980
Evolving SEO for Evolving Search Engines
ryanjones
0
180
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
410
Transcript
Агрегация и обработка статистики реального времени Валерий Змиевской
Что нам нужно? • База данных • Отказаться от запросов:
group by keyfield … order by sum(datafield) desc • Upsert MongoDB, MySQL - есть нативный синтаксис
Как хранить данные Хранить данные для каждого ключа группировки в
отдельной таблице: user : [last_login, orders, coupons_used, …] category, date : [orders_amount, items_sold] region, date : [orders_amount, items_sold] ….
OLAP-куб на одной таблице Ключи : данные [region, category, year,
month] : [ord, isold] [<all>, 12, 2013, 01] : [100, 665] [<all>, <all>, 2013, 01] : [1600, 5200] ….
Срезы [region, category, year, month] [0, 0, 1, 0], [0,
0, 1, 1], [1, 0, 1, 0], [1, 0, 1, 1] [0, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1] [0, 1, 0, 0], [1, 1, 0, 0] Не нужны срезы: [*, *, 0, 1] и [*, 0, 0, 0]
Показываем: category, графики по месяцам Сортируем: ord, isold Индексы: •
region, category, year, month - unique|Charts • region, year, month, ord - Orders/Category • region, year, month, isold - It. sold/Category Индексы
Запросы: Категории: region=<all>, year=<all>, month=<all> region=EU, year=<all>, month=<all> region=EU, year=2013,
month=<all> График по категории Goods за 2013 год region=EU, year=2013, category=’Goods’