com presentations: Added another slide, on indexes with $or.: mongo-index-mongouk12.xml slides/mongodb/idx-or.xml
| From: | Derick Rethans | Date: | Wed, 20 Jun 2012 11:19:50 +0000 |
| Subject: | com presentations: Added another slide, on indexes with $or.: mongo-index-mongouk12.xml slides/mongodb/idx-or.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1823@lists.php.net to get a copy of this message | ||
Commit: 7817ebe17de87b3dc5406156ddad2aa7b9e9fe49
Author: Derick Rethans <github@derickrethans.nl> Wed, 20 Jun 2012 12:19:50 +0100
Parents: d91ea44cfe2821946523fd698f6fb2cdc1e20727
Branches: master
Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=7817ebe17de87b3dc5406156ddad2aa7b9e9fe49
Log:
Added another slide, on indexes with $or.
Changed paths:
M mongo-index-mongouk12.xml
A slides/mongodb/idx-or.xml
Diff:
diff --git a/mongo-index-mongouk12.xml b/mongo-index-mongouk12.xml
index 1dce5c0..0823377 100644
--- a/mongo-index-mongouk12.xml
+++ b/mongo-index-mongouk12.xml
@@ -51,6 +51,7 @@ sleep 4; for i in
seq 0 7; do ^Crefox http://pres/show2.php/mongo-index-mongou
<slide>slides/mongodb/idx-covered.xml</slide>
<slide>slides/mongodb/idx-multi-key.xml</slide>
<slide>slides/mongodb/idx-which-one-is-picked.xml</slide>
+<slide>slides/mongodb/idx-or.xml</slide>
<slide>slides/mongodb/idx-map2.xml</slide>
<slide>slides/mongodb/idx-geo..xml</slide>
diff --git a/slides/mongodb/idx-or.xml b/slides/mongodb/idx-or.xml
new file mode 100644
index 0000000..0714e5f
--- /dev/null
+++ b/slides/mongodb/idx-or.xml
@@ -0,0 +1,32 @@
+<slide>
+<title>Indexes with $or</title>
+
+<example inline="1">
+db.cities.ensureIndex( { country_code: 1 } );
+db.cities.find( { *$or*: [|f10000|{country_code: 'NL'}|, |00cc00|{country_code:
'BE'}|] } ).explain();
+</example>
+<example inline="1">
+{
+ *"clauses" : [*
+ {
+ |f10000|"cursor" : "BtreeCursor country_code_1",|
+ |f10000|"nscanned" : 256,|
+ |f10000|"nscannedObjects" : 256,|
+ |f10000|"n" : 256,|
+...
+ |f10000|"indexBounds" : { "country_code" : [ [ "NL",
"NL" ] ] }|
+ },
+ {
+ |00cc00|"cursor" : "BtreeCursor country_code_1",|
+ |00cc00|"nscanned" : 184,|
+...
+ |00cc00|"indexBounds" : { "country_code" : [ [ "BE",
"BE" ] ] }|
+ }
+ ],
+ "nscanned" : 440,
+ "nscannedObjects" : 440,
+ "n" : 440,
+ "millis" : 3
+}
+</example>
+</slide>