Skip to content

Latest commit

 

History

History
264 lines (211 loc) · 5.53 KB

slides.md

File metadata and controls

264 lines (211 loc) · 5.53 KB
theme lineNumbers info drawings download title layout
datev-scc
false
## MongoDB Indizes - Sneak Preview Intro zu MongoDB Indizes und Compass
persist
true
MongoDB Indizes - Sneak Preview
intro

MongoDB Indizes
Sneak Preview

Intro zu MongoDB Indizes und Compass


layout: quote author: "Wikipedia: Sneak Preview" link: https://de.wikipedia.org/wiki/Sneak_Preview

Eine Sneak Preview oder kurz Sneak ist eine unangekündigte Filmvorführung (Vorschau) vor dem offiziellen Release [...].

<style> p { @apply font-light; } </style>

SQL Bias

```mermaid {theme: 'neutral', scale: 0.7} graph TD B[Neue Query für MongoDB] --> C{Entscheidung} C -->|SQL| D[SELECT * ..] C -->|MQL| E[db.find ] D -->|Transform| F[db.find] E -->|Execute| G[Query Result] F -->|Execute| H[Query Result] ```
<style> h1 { @apply !text-2xl; } </style>

Plan

  • Features von MongoDB Compass vorstellen
  • Single Field Indizes
  • Compound Indizes
  • Covered Queries 💡🚀
  • 🎁

class: fade

MongoDB Compass

  • GUI für den Zugriff auf MongoDB
  • Vollversion frei verfügbar 1
  • Realtime Performance Tab 2
  • CRUD Funktionalität 3
  • Aggregation Pipeline Builder 4 💪
<style> h1 { @apply !text-2xl; } .footnotes-sep { @apply mt-40 opacity-10; } .footnotes { @apply text-sm opacity-75; } .footnote-backref { display: none; } </style>

Datenbankindex kurz erklärt 1

<style> h1 { @apply !text-2xl; } .footnotes-sep { @apply mt-105 opacity-10; } .footnotes { @apply text-sm opacity-75; } .footnote-backref { display: none; } </style>

class: fade

Nutzt die Query den Index ?

  • schnelle Ausführung
  • geringe Ressourcenauslastung (Disk, CPU, ...)
  • Performance Advisor zeigt keine
  • Query Plan analysieren 🕵️
    • explain()
"queryPlanner" : {
   "parsedQuery" : {},
   "winningPlan" : {
      "stage" : <STAGE1>,
      ...
      "inputStage" : {
         "stage" : <STAGE2>,
         ...
      }
    },
   "rejectedPlans" : []
}

Explain results

<style> h1 { @apply !text-1xl; } .footnotes-sep { @apply mt-105 opacity-10; } .footnotes { @apply text-sm opacity-75; } .footnote-backref { display: none; } </style>

AirBnB Dataset 1

{
  "_id": "10006546",
  "listing_url": "https://www.airbnb.com/rooms/10006546",
  "name": "Ribeira Charming Duplex",
  "property_type": "House",
  "room_type": "Entire home/apt",
  "bed_type": "Real Bed",
  "minimum_nights": "2",
  "cancellation_policy": "moderate",
  "last_scraped": {
    "$date": {
      "$numberLong": "1550293200000"
    }
  },
  "address": {
    "country": "Portugal",
  }
}
<style> h1 { @apply !text-2xl; } .footnotes-sep { @apply mt-20 opacity-10; } .footnotes { @apply text-sm opacity-75; } .footnote-backref { display: none; } </style>

Demo 👩‍💻

<style> h1 { @apply text-shadow-xl; } </style>

layout: cover

Danke! 🚀

Footnotes

  1. MongoDB Compass is now free for all! 2 3

  2. MongoDB Compass Performance Tab

  3. Capabilities of Compass Editions

  4. Aggregation Pipeline Builder