**Technical Background:** I'm using tokumx (support [document level locking](http://docs.tokutek.com/tokumx/tokumx-concurrency.html#tokumx-concurrency-document-level-locks)) and php.

The document structure is like this

```
{
  "accounts": [
    {
      "username": "1",
    },
    {
      "username": "2",
    }
  ],
  "site": "test.com"
}

```

**Situation:**

Most of the time, I only need **first x accounts** from "accounts" array.

The minutes **these first x accounts** are retrieved, they should be deleted from the "accounts" array in the document.

**Compromise I can make:**

extract out "accounts".

```
  {
    "username" : "1",
    "site": "test.com"
  },

  {
    "username" : "2",
    "site": "test.com"
  }

```

Or switch to MySql (last option).

---