diff --git a/src/Entity/Flagging.php b/src/Entity/Flagging.php
index 4234e84..2988500 100644
--- a/src/Entity/Flagging.php
+++ b/src/Entity/Flagging.php
@@ -21,6 +21,7 @@ use Drupal\user\UserInterface;
  *  bundle_label = @Translation("Flagging"),
  *  handlers = {
  *    "storage" = "Drupal\flag\Entity\Storage\FlaggingStorage",
+ *    "storage_schema" = "Drupal\flag\Entity\Storage\FlaggingStorageSchema",
  *    "form" = {
  *      "add" = "Drupal\flag\Form\FlaggingForm",
  *      "edit" = "Drupal\flag\Form\FlaggingForm",
diff --git a/src/Entity/Storage/FlaggingStorageSchema.php b/src/Entity/Storage/FlaggingStorageSchema.php
new file mode 100644
index 0000000..f99bf02
--- /dev/null
+++ b/src/Entity/Storage/FlaggingStorageSchema.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\flag\Entity\Storage;
+
+use Drupal\Core\Entity\ContentEntityTypeInterface;
+use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema;
+
+/**
+ * Defines the flag schema handler.
+ */
+class FlaggingStorageSchema extends SqlContentEntityStorageSchema {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
+    $schema = parent::getEntitySchema($entity_type, $reset);
+
+    $schema['flagging']['indexes'] += array(
+      'entity_id__uid' => array('entity_id', 'uid'),
+    );
+
+    return $schema;
+  }
+
+}
