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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Агрегация и обработка статистики
Доклад Валерия Змиевского, kharkivpy #8
Yehor Nazarkin
August 12, 2013
More Decks by Yehor Nazarkin
See All by Yehor Nazarkin
Flask, гордость и предубеждения
nimnull
0
350
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
330
REST in Flask (And small client-side intro)
nimnull
10
1.7k
Other Decks in Programming
See All in Programming
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
200
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
200
数百円から始めるRuby電子工作
tarosay
0
130
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
750
5分で問診!Composer セキュリティ健康診断
codmoninc
0
860
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
330
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
250
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
820
霧の中の代数的エフェクト
funnyycat
1
460
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
650
What's New in Android 2026
veronikapj
0
250
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
Everyday Curiosity
cassininazir
0
270
The Spectacular Lies of Maps
axbom
PRO
1
890
The Curious Case for Waylosing
cassininazir
1
450
Joys of Absence: A Defence of Solitary Play
codingconduct
1
420
Become a Pro
speakerdeck
PRO
31
6.1k
Navigating Weather and Climate Data
rabernat
0
440
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
410
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
530
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
460
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’