diff --git a/panelizer.install b/panelizer.install
index 0d3d802..a4a93fe 100644
--- a/panelizer.install
+++ b/panelizer.install
@@ -122,9 +122,11 @@ function panelizer_schema() {
       ),
     ) + $common_fields,
     'primary key' => array('entity_type', 'entity_id', 'revision_id', 'view_mode'),
+    'indexes' => array(
+      'revision_id' => array('revision_id'),
+    ),
   );
 
-
   $schema['panelizer_defaults'] = array(
     'description' => 'Node type panelizer references.',
     'export' => array(
@@ -1201,3 +1203,16 @@ function panelizer_update_7300(&$sandbox) {
     $sandbox['#finished'] = $sandbox['progress'] / $sandbox['max'];
   }
 }
+
+/**
+ * Add an index to {panelizer_entity} revision IDs.
+ */
+function panelizer_update_7301() {
+  if (!db_index_exists('panelizer_entity', 'revision_id')) {
+    db_add_index('panelizer_entity', 'revision_id', array('revision_id'));
+    return t('Added an extra index on the {panelizer_entity} table for the revision_id column.');
+  }
+  else {
+    return t('There was already an index on the {panelizer_entity} table for the revision_id column, so nothing was done.');
+  }
+}
diff --git a/plugins/entity/PanelizerEntityDefault.class.php b/plugins/entity/PanelizerEntityDefault.class.php
index be7b96d..c6aa6ea 100644
--- a/plugins/entity/PanelizerEntityDefault.class.php
+++ b/plugins/entity/PanelizerEntityDefault.class.php
@@ -1423,7 +1423,7 @@ public function hook_entity_load(&$entities) {
 
     // Load all the panelizers associated with the list of entities.
     if ($this->supports_revisions) {
-      $result = db_query("SELECT * FROM {panelizer_entity} WHERE entity_type = :entity_type AND entity_id IN (:ids) AND revision_id IN (:vids)", array(':entity_type' => $this->entity_type, ':ids' => $ids, ':vids' => $vids));
+      $result = db_query("SELECT * FROM {panelizer_entity} WHERE entity_type = :entity_type AND AND revision_id IN (:vids)", array(':entity_type' => $this->entity_type, ':vids' => $vids));
     }
     else {
       $result = db_query("SELECT * FROM {panelizer_entity} WHERE entity_type = :entity_type AND entity_id IN (:ids)", array(':entity_type' => $this->entity_type, ':ids' => $ids));
