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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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.3k
GPU Computing in Python
nimnull
1
5.7k
To Flask or not to Flask
nimnull
5
650
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
mrbgem 三角測量 開発
ogom
0
150
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
30
13k
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
310
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.2k
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
370
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3k
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
770
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
280
App Intentsのビルドプロセスを支える技術
kntkymt
0
480
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
570
Featured
See All Featured
Accessibility Awareness
sabderemane
1
220
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
560
ラッコキーワード サービス紹介資料
rakko
1
5.1M
Designing for humans not robots
tammielis
254
26k
Bash Introduction
62gerente
615
220k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
510
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
330
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
290
The Pragmatic Product Professional
lauravandoore
37
7.5k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
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’