SlideShare ist ein Scribd-Unternehmen logo
1 von 27
RavenDB
A Deep Dive into Indexes




                           S
Alonso Robles


S Principal Consultant @ Headspring

S Blog: http://alonsorobles.com

S Linked In: http://linkedin.com/in/alonsorobles

S Twitter: @alonsorobles
Central Texas
GiveCamp
September 28-30, 2012
Interested in Participating?
    Developer – Make software. Have fun. Do
    good!
    Non-Profit – What can we build for you?
    Sponsor – Help make the even successful.

More Info:
http://ctxgivecamp.org
The Query
How does RavenDB find what we are looking
                                     for?




                                            S
Simple Query
What Happens?


           .NET Client
           sends query




Server returns        Server
   results        processes query
How is the Query Processed?
The Index
A short and brief introduction




                                 S
ACID versus BASE

               ACID                     BASE
S   Atomic             S   Basically Available

S   Consistent         S   Soft state

S   Isolated           S   Eventually consistent

S   Durable
ACID Document Operations


S Store

S Delete

S Update
BASE Queries


S Fast

S Stale Results

S   Powered by Lucene
Lucene


S Mature, De Facto Standard Information Retrieval Library

S Scalable, High Performance Indexing

S Powerful, Accurate and Efficient Search Algorithms

S Originally Written in Java and Ported to Many Languages

S Used by Apple, IBM, Linked In and many more…
Types of Indexes


S Temporary Dynamic Index
  S Created on the fly to service a query when no existing index
     can be used

S Permanent Dynamic Index
  S Promoted when a temporary index is used a lot

S Static Index
  S User defined
Static Indexes
Why? Aren’t the dynamic indexes enough?




                                          S
Reasons for Static Indexes


S Index Creation is Expensive

S Additional Functionality
  S Custom Sorting
  S Boosting
  S Full-Text Search
  S Live Projections
  S Spatial Search
Simple Index Definition
Using the Index in a Query
Reducing Results
Using Sort Options
Even More Options
Live Projections
Stale Indexes
    Working with staleness




                             S
Why Must It Be Stale?


S Indexing occurs on a background thread

S Keeps queries lightning fast

S Better to be stale than offline
Checking for Stale Results
But Non-Stale Won’t Do
Questions
     Ask away!




                 S
More Info


S Official Raven Website: http://ravendb.net

S Oren’s Blog: http://ayende.com

S Google Group: http://groups.google.com/group/ravendb/

S My Blog: http://alonsorobles.com

S Local Training: http://headspring.com

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

CosmosDb for beginners
CosmosDb for beginnersCosmosDb for beginners
CosmosDb for beginners
 
Azure CosmosDb - Where we are
Azure CosmosDb - Where we areAzure CosmosDb - Where we are
Azure CosmosDb - Where we are
 
Azure DocumentDB 101
Azure DocumentDB 101Azure DocumentDB 101
Azure DocumentDB 101
 
Build 2017 - P4010 - A lap around Azure HDInsight and Cosmos DB Open Source A...
Build 2017 - P4010 - A lap around Azure HDInsight and Cosmos DB Open Source A...Build 2017 - P4010 - A lap around Azure HDInsight and Cosmos DB Open Source A...
Build 2017 - P4010 - A lap around Azure HDInsight and Cosmos DB Open Source A...
 
Text search with Elasticsearch on AWS
Text search with Elasticsearch on AWSText search with Elasticsearch on AWS
Text search with Elasticsearch on AWS
 
Azure document db/Cosmos DB
Azure document db/Cosmos DBAzure document db/Cosmos DB
Azure document db/Cosmos DB
 
How and when to use NoSQL
How and when to use NoSQLHow and when to use NoSQL
How and when to use NoSQL
 
Bleeding Edge Databases
Bleeding Edge DatabasesBleeding Edge Databases
Bleeding Edge Databases
 
Azure CosmosDb
Azure CosmosDbAzure CosmosDb
Azure CosmosDb
 
Explore Azure Cosmos DB
Explore Azure Cosmos DBExplore Azure Cosmos DB
Explore Azure Cosmos DB
 
Azure Cosmos DB - NoSQL In the Microsoft Cloud
Azure Cosmos DB - NoSQL In the Microsoft CloudAzure Cosmos DB - NoSQL In the Microsoft Cloud
Azure Cosmos DB - NoSQL In the Microsoft Cloud
 
Database Choices
Database ChoicesDatabase Choices
Database Choices
 
Tips & Tricks SQL in the City Seattle 2014
Tips & Tricks SQL in the City Seattle 2014Tips & Tricks SQL in the City Seattle 2014
Tips & Tricks SQL in the City Seattle 2014
 
Move your on prem data to a lake in a Lake in Cloud
Move your on prem data to a lake in a Lake in CloudMove your on prem data to a lake in a Lake in Cloud
Move your on prem data to a lake in a Lake in Cloud
 
Amazon Kinesis Data Streams
Amazon Kinesis Data StreamsAmazon Kinesis Data Streams
Amazon Kinesis Data Streams
 
Not only SQL - Database Choices
Not only SQL - Database ChoicesNot only SQL - Database Choices
Not only SQL - Database Choices
 
Introduction to CosmosDB - Azure Bootcamp 2018
Introduction to CosmosDB - Azure Bootcamp 2018Introduction to CosmosDB - Azure Bootcamp 2018
Introduction to CosmosDB - Azure Bootcamp 2018
 
Survey of the Microsoft Azure Data Landscape
Survey of the Microsoft Azure Data LandscapeSurvey of the Microsoft Azure Data Landscape
Survey of the Microsoft Azure Data Landscape
 
Benefícios e melhores práticas no uso do Amazon Redshift
Benefícios e melhores práticas no uso do Amazon RedshiftBenefícios e melhores práticas no uso do Amazon Redshift
Benefícios e melhores práticas no uso do Amazon Redshift
 
AWS for Big Data Experts
AWS for Big Data ExpertsAWS for Big Data Experts
AWS for Big Data Experts
 

Ähnlich wie RavenDB - Indexes Deep Dive

AWS at ArgyleSocial
AWS at ArgyleSocialAWS at ArgyleSocial
AWS at ArgyleSocial
triangle_aws
 
SQL Server and Azure Mobile Business Intelligence
SQL Server and Azure Mobile Business IntelligenceSQL Server and Azure Mobile Business Intelligence
SQL Server and Azure Mobile Business Intelligence
Jen Stirrup
 
Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013
Aaron Blythe
 
Karan_Verma_Resume
Karan_Verma_ResumeKaran_Verma_Resume
Karan_Verma_Resume
Karan Verma
 

Ähnlich wie RavenDB - Indexes Deep Dive (20)

Microservices, Events, and Breaking the Data Monolith with Kafka
Microservices, Events, and Breaking the Data Monolith with KafkaMicroservices, Events, and Breaking the Data Monolith with Kafka
Microservices, Events, and Breaking the Data Monolith with Kafka
 
Scala & Swagger at Wordnik
Scala & Swagger at WordnikScala & Swagger at Wordnik
Scala & Swagger at Wordnik
 
AWS at ArgyleSocial
AWS at ArgyleSocialAWS at ArgyleSocial
AWS at ArgyleSocial
 
Steve Bowden - Alexa Presentation - Why I build Alexa Skills
Steve Bowden  - Alexa Presentation - Why I build Alexa SkillsSteve Bowden  - Alexa Presentation - Why I build Alexa Skills
Steve Bowden - Alexa Presentation - Why I build Alexa Skills
 
SQL Server and Azure Mobile Business Intelligence
SQL Server and Azure Mobile Business IntelligenceSQL Server and Azure Mobile Business Intelligence
SQL Server and Azure Mobile Business Intelligence
 
Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013Devops kc meetup_5_20_2013
Devops kc meetup_5_20_2013
 
Beyond the basic Swagger UI: Adyen API Explorer
Beyond the basic Swagger UI: Adyen API ExplorerBeyond the basic Swagger UI: Adyen API Explorer
Beyond the basic Swagger UI: Adyen API Explorer
 
Picking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use CasePicking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use Case
 
Amazon QuickSight
Amazon QuickSightAmazon QuickSight
Amazon QuickSight
 
Getting Started with Amazon QuickSight
Getting Started with Amazon QuickSightGetting Started with Amazon QuickSight
Getting Started with Amazon QuickSight
 
Lunch && Learn DevHub - 6 Things to Learn to become an AWS Genius
Lunch && Learn DevHub - 6 Things to Learn to become an AWS GeniusLunch && Learn DevHub - 6 Things to Learn to become an AWS Genius
Lunch && Learn DevHub - 6 Things to Learn to become an AWS Genius
 
2010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week12010-07-19_rails_tdd_week1
2010-07-19_rails_tdd_week1
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns Webinar
 
How to become the most sought after SQL Professional
How to become the most sought after SQL Professional How to become the most sought after SQL Professional
How to become the most sought after SQL Professional
 
Global Azure Bootcamp Montreal 2017
Global Azure Bootcamp Montreal 2017Global Azure Bootcamp Montreal 2017
Global Azure Bootcamp Montreal 2017
 
Karan_Verma_Resume
Karan_Verma_ResumeKaran_Verma_Resume
Karan_Verma_Resume
 
MEAN.js Workshop
MEAN.js WorkshopMEAN.js Workshop
MEAN.js Workshop
 
AWS October Webinar Series - Introducing Amazon QuickSight
AWS October Webinar Series - Introducing Amazon QuickSightAWS October Webinar Series - Introducing Amazon QuickSight
AWS October Webinar Series - Introducing Amazon QuickSight
 
Ibm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshopIbm_interconnect_restapi_workshop
Ibm_interconnect_restapi_workshop
 
Documenting Your API
Documenting Your APIDocumenting Your API
Documenting Your API
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

RavenDB - Indexes Deep Dive

Hinweis der Redaktion

  1. Every index is required to have a name and a Map function. The Map function is the way for us to tell RavenDB how to find the data we are interested in, and what fields we are going to be searching on. The Map function is written in LINQ, just like you'd write a simple query
  2. The Reduce function is optional, and is written and executed just like the Map function, but this time on the results of the Map function. This is actually a second indexing pass, which allows us to perform aggregation operations quite cheaply, directly from the index.
  3. Sorting by default is performed lexographically.
  4. FieldStorageNo (default) – Does not store the value of the field in the indexYes – Stores the value of field Compress – Compresses the value of the field (good for long text or binary fields)FieldInexing OptionsAnalyzed – Standard analysis good for full text search or text fields (breaks up text into terms and performs stemming analysis)Default – LowerCaseKeywordAnalyzer (stores the entire field as a single term for exact matching)No – Field is not indexed thus cannot be searched. But it can still be accessed assuming it was stored.NotAnalyzed – Indexes the field without performing analysis. This is good for unique ids like product numbers (UPC, ISBN, MPN)
  5. Using the Live Projections feature, you have more control over what to load into the result entity, and since it returns a projection of the original entity, you also get the chance to filter out properties you do not need.
  6. WaitForNonStaleResultsAsOf()WaitForNonStaleResultsAsOfNow()WaitForNonStaleResultsAsOffLastWrite()