Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • B benchPlatform
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OnGres Inc.OnGres Inc.
  • benchPlatform
  • Wiki
  • Querys for Mongo and Postgres OLAP bench

Querys for Mongo and Postgres OLAP bench · Changes

Page history
Create Querys for Mongo and Postgres OLAP bench authored Apr 15, 2019 by Sergio Ostapowicz's avatar Sergio Ostapowicz
Hide whitespace changes
Inline Side-by-side
Querys-for-Mongo-and-Postgres-OLAP-bench.md 0 → 100644
View page @ 5332a27f
## This querys were extracted from AHT blog https://www.8kdata.com/blog/announcing-torodb-stampede-1-0-beta/ for run in our test and modify if necessary.
## PostgreSQL
### Stampede-GithuQuery-PostgreSQL-A
```
SELECT repo.name_s, count(*)
FROM github.events AS events
INNER JOIN github.events_repo AS repo ON (events.did = repo.did)
INNER JOIN github.events_payload AS payload ON (events.did=payload.did)
WHERE events.type_s = 'IssuesEvent' AND payload.action_s = 'opened'
GROUP BY repo.name_s
ORDER BY count desc;
```
### Stampede-GithuQuery-PostgreSQL-B
```
SELECT type_s, count(*)
FROM github.events
GROUP BY type_s
ORDER BY count desc;
```
### Stampede-GithuQuery-PostgreSQL-C
```
SELECT events.type_s, count(*)
FROM github.events AS events
JOIN github.events_actor AS actor ON (events.did = actor.did)
GROUP BY type_s
ORDER BY count DESC;
```
### Stampede-GithuQuery-PostgreSQL-D
```
SELECT action_s, count(*)
FROM github.events_payload
WHERE action_s IS NOT NULL
GROUP BY action_s
ORDER BY count DESC;
```
### Stampede-GithuQuery-PostgreSQL-E
```
WITH distinct_commits AS (
SELECT DISTINCT repo.name_s, actor.login_s
FROM github.events AS events
INNER JOIN github.events_actor AS actor ON (events.did = actor.did)
INNER JOIN github.events_repo AS repo ON (events.did = repo.did)
WHERE events.type_s = 'PushEvent'
)
SELECT name_s, count(*)
FROM distinct_commits
GROUP BY name_s
ORDER BY count DESC;
```
### Stampede-GithuQuery-PostgreSQL-F
```
SELECT repo.name_s, avg(payload.size_i)
FROM github.events AS events
INNER JOIN github.events_repo AS repo ON (events.did = repo.did)
INNER JOIN github.events_payload AS payload ON (events.did=payload.did)
WHERE events.type_s = 'PushEvent' AND payload.size_i > 2
GROUP BY repo.name_s
ORDER BY avg DESC;
```
\ No newline at end of file
Clone repository
  • Benchmark Track
  • Configuration for all tests
  • Querys for Mongo and Postgres OLAP bench
  • Results Analysis
  • Tooling
  • Home