Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2764

After upgraded to mongoid 3.xx, query became super slow

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.1.2
    • Affects Version/s: None
    • Component/s: None

        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=1870358178474730255 (243.6118ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (22.0308ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=1877325285443740719 (99.6253ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.8081ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=8254336355375228099 (98.7673ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.5797ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=1871842970143794518 (261.2903ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.5671ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=8351978386695628426 (97.9640ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.4150ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=1221663781423916826 (255.9891ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (23.8421ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=1291136775812261964 (100.5921ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.7869ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=6785809675921893601 (246.3486ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.9300ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=2086923181296953861 (101.8643ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (23.7370ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=7640943080509254298 (99.2498ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.5049ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=4298692873286298414 (278.7309ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.0478ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=1475562461049105523 (121.6881ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (27.6170ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=7368366296783367455 (244.1018ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (23.6530ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=7158745246761463368 (100.4231ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (27.3850ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=7385296688497012451 (290.7498ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (23.2530ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=5779265441356296261 (99.9231ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (24.5750ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=767477874704494810 (97.7519ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (22.0768ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=4710616258863411570 (288.7352ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (22.3851ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=7147499274328847042 (100.8122ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (22.2759ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=2837635829155476309 (253.3422ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (24.2620ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=7334741646363047043 (99.0222ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (22.6250ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=4652629853860508951 (245.2130ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (22.6831ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=1017703408103831099 (99.6900ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (22.9709ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=4391779103946815182 (95.9158ms)
        MOPED: 127.0.0.1:27017 QUERY        database=hivenation_development collection=users selector={"$query"=>{}, "$orderby"=>{"_id"=>-1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (21.4131ms)
        MOPED: 127.0.0.1:27017 GET_MORE     database=hivenation_development collection=users limit=0 cursor_id=7191897961880336222 (255.5678ms)
      ........................
      ........................
      Completed 200 OK in 15573ms (Views: 15532.5ms)
      

      Any ideas?

            Assignee:
            Unassigned Unassigned
            Reporter:
            jerryshen jerryshen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: