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

Poor performance with fields of type: Hash

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.2
    • Affects Version/s: None
    • Component/s: None
    • None

      I have a document with a field of type: Hash which exhibits very poor performance when loading any records. Most of these documents have ~2500 keys in this hash field. It takes ~900ms to load a single document. If I query for a document without(:my_hash_field) the load time drops to ~30ms. Database is local so I don't think it is network latency.

      This happens with both mongoid 3.1.6 and 4.0.0 under ruby 2.1.2. This seems to be very poor performance for simply loading a document. Is this kind of performance expected when loading a document with a 2500 key hash?

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

              Created:
              Updated:
              Resolved: