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
Transcript
7 slides
Агрегация и обработка статистики реального времени Валерий Змиевской
Что нам нужно? • База данных • Отказаться от запросов:
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’
More Decks by Yehor Nazarkin
See All by Yehor Nazarkin
Flask, гордость и предубеждения
nimnull
0
360
Python non-mainstream web
nimnull
0
180
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
340
REST in Flask (And small client-side intro)
nimnull
10
1.8k
Other Decks in Programming
See All in Programming
Getting Started with Vibe Coding
miccheng
0
230
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
240
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
110
LLM 101
dalinaum
0
500
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
190
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
270
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
640
SODA - FACT BOOK(JP)
sodainc
1
40k
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
200
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
140
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5.9k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
950
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Unsuck your backbone
ammeep
672
58k
Practical Orchestrator
shlominoach
192
12k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k