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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
250
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
270
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.5k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
270
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
200
Google Nest CamとApple Vision frameworkと猫🐈🐈⬛ / onishi50
yutailang0119
0
110
第3木曜LT会 #28
tinykitten
PRO
0
110
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
0
150
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
210
의존성 주입과 모듈화
fornewid
0
140
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
3
230
おれのAgentic Coding 2026/03
tsukasagr
1
150
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Building Applications with DynamoDB
mza
96
7k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
500
Building a Scalable Design System with Sketch
lauravandoore
463
34k
New Earth Scene 8
popppiees
3
2.1k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Mind Mapping
helmedeiros
PRO
1
150
How to build a perfect <img>
jonoalderson
1
5.4k
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’