Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Агрегация и обработка статистики
Search
Yehor Nazarkin
August 12, 2013
Programming
5.8k
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.4k
GPU Computing in Python
nimnull
1
5.7k
To Flask or not to Flask
nimnull
5
660
MongoDB Без ORM
nimnull
0
330
REST in Flask (And small client-side intro)
nimnull
10
1.8k
Other Decks in Programming
See All in Programming
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
2.8k
ジョジョの世界をXRで再現する
mofurune
0
180
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
200
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.1k
気持ちぃ〜角丸 Squircle
ryu1013
0
330
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
1.7k
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
34k
Railsバージョンを4倍にした話
optim
0
540
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
170
Kotlinの15年とServer-Side Kotlin
n_takehata
1
160
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
530
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
500
Evolving SEO for Evolving Search Engines
ryanjones
0
330
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
590
How STYLIGHT went responsive
nonsquared
100
6.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
330
Making Projects Easy
brettharned
120
6.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Ethics towards AI in product and experience design
skipperchong
2
440
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
810
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’