Skip to content

Instantly share code, notes, and snippets.

@erh
Created March 20, 2010 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erh/338401 to your computer and use it in GitHub Desktop.
Save erh/338401 to your computer and use it in GitHub Desktop.
db.foo.drop()
o = { "upc" : 1 ,
"related_skus" : [ 1,2, 3, 4, 5, 6 ] ,
"price_special" : 700000,
"short_name" : "sn700000",
"ean" : "ean700000",
"price_promo" :700000,
"long_name" : "ln700000",
"url" : "url700000",
"dim_x" : 700000,
"cpo_sku" : "sku700000",
"image_url" : "iurl700000",
"dim_y" : 700000,
"vendor_sku" : "vsku700000",
"price_sales" : 700000,
"dim_z" : 700200,
"published" : true,
"price_retail" : 700000,
"features" : [
{"type" : 1,"name" : "f700000.1"},
{"type" : 1,"name" : "f700000.2"},
{"type" : 1,"name" : "f700000.3"},
{"type" : 1,"name" : "f700000.4"},
{"type" : 1,"name" : "f700000.5"},
{"type" : 1,"name" : "f700000.6"},
{"type" : 1,"name" : "f700000.7"}
],
"includes" : [
{"type" : 1,"name" : "i700000.1"},
{"type" : 1,"name" : "i700000.2"},
{"type" : 1,"name" : "i700000.3"},
{"type" : 1,"name" : "i700000.4"},
],
"ppoints" : [
{"type" : 1,"name" : "p700000.1"},
{"type" : 1,"name" : "p700000.2"},
{"type" : 1,"name" : "p700000.3"},
{"type" : 1,"name" : "p700000.4"},
{"type" : 1,"name" : "p700000.5"},
{"type" : 1,"name" : "p700000.6"},
{"type" : 1,"name" : "p700000.7"},
{"type" : 1,"name" : "p700000.8"},
{"type" : 1,"name" : "p700000.9"},
{"type" : 1,"name" : "p700000.10"},
{"type" : 1,"name" : "p700000.11"},
{"type" : 1,"name" : "p700000.12"},
{"type" : 1,"name" : "p700000.13"}
],
"notes" : [
{"text" : "this is note number 700000.1"},
{"text" : "this is note number 700000.2"},
{"text" : "this is note number 700000.3"},
{"text" : "this is note number 700000.4"},
{"text" : "this is note number 700000.5"},
{"text" : "this is note number 700000.6"}
]
}
for ( i=0; i<1000000; i++ ){
o.upc = i;
db.foo.insert( o );
}
printjson( db.foo.find( { upc : i - 1 } ).explain() )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment