Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3692

--notablescan doesn't prevent scans without a predicate

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL

      I started up my mongod with the --notablescan option. I had the twitter tweets collection from the training coarse loaded, but I'm sure this will work with any collection.

      Table scans with predicates generate errors, but table scans without predicates do not:

      > db.tweets.find(

      {'user.followers_count':1000}

      );
      error:

      { "$err" : "table scans not allowed:twitter.tweets", "code" : 10111 }

      > db.tweets.find().skip(1000).limit(1);
      { "_id" : ObjectId("4e55766a89c942db6fdd8ddc"), "text" : "@LiLMAMAs0FLi yhu qoht
      ah aim ma?", "in_reply_to_status_id" : NumberLong("22815133901"), "retweet_coun
      t" : null, "contributors" : null, "created_at" : "Thu Sep 02 18:13:21 +0000 2010
      ", "geo" : null, "source" : "<a href=\"http://www.sidekick.com\" rel=\"nofollow\
      ">T-Mobile Sidekick</a>", "coordinates" : null, "in_reply_to_screen_name" : "LiL
      MAMAs0FLi", "truncated" : false, "entities" : { "user_mentions" : [

      { "indices" : [ 0, 13 ], "screen_name" : "LiLMAMAs0FLi", "name" : "KiMMiE BAByy", "id" : 105635017 }

      ], "urls" : [ ], "hashtags" : [ ] },
      "retweeted" : false, "place" : null, "user" :

      { "friends_count" : 46, "profile_s idebar_fill_color" : "C0DFEC", "location" : "Brooklyn New York", "verified" : fa lse, "follow_request_sent" : null, "favourites_count" : 0, "profile_sidebar_bord er_color" : "a8c7f7", "profile_image_url" : "http://a0.twimg.com/profile_images/ 896020476/Picture_038_normal.jpg", "geo_enabled" : false, "created_at" : "Tue Ma y 11 23:38:23 +0000 2010", "description" : "", "time_zone" : "Quito", "url" : nu ll, "screen_name" : "kool_aid_kid516", "notifications" : null, "profile_backgrou nd_color" : "022330", "listed_count" : 1, "lang" : "en", "profile_background_ima ge_url" : "http://s.twimg.com/a/1283397887/images/themes/theme15/bg.png", "statu ses_count" : 208, "following" : null, "profile_text_color" : "333333", "protecte d" : false, "show_all_inline_media" : false, "profile_background_tile" : false, "name" : "peter duchatellier", "contributors_enabled" : false, "profile_link_col or" : "0084B4", "followers_count" : 24, "id" : 142859223, "profile_use_backgroun d_image" : true, "utc_offset" : -18000 }

      , "favorited" : false, "in_reply_to_user
      _id" : 105635017, "id" : NumberLong("22819521200") }

      Plain db.tweets.find(); works also, but scrolls off the screen, so I couldn't cut-and-paste it as above.

            Assignee:
            Unassigned Unassigned
            Reporter:
            cwestin Chris Westin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: