diff --git a/src/Plugin/VdbProvider/PostgresProvider.php b/src/Plugin/VdbProvider/PostgresProvider.php
index 9d09f86..060ee05 100644
--- a/src/Plugin/VdbProvider/PostgresProvider.php
+++ b/src/Plugin/VdbProvider/PostgresProvider.php
@@ -375,6 +375,7 @@ class PostgresProvider extends AiVdbProviderClientBase implements ContainerFacto
       collection_name: $collection_name,
       output_fields: ['id'],
       filters: "WHERE drupal_entity_id IN $prepared_drupal_ids",
+      limit: 16384,
       database: $database
     );
     $ids = [];
diff --git a/src/PostgresPgvectorClient.php b/src/PostgresPgvectorClient.php
index fd5ebd5..86e30e2 100644
--- a/src/PostgresPgvectorClient.php
+++ b/src/PostgresPgvectorClient.php
@@ -236,7 +236,7 @@ class PostgresPgvectorClient {
     $prepared_ids = $this->prepareStringArrayForSql(items: $ids, connection: $connection);
     $result = pg_query(
       connection: $connection,
-      query: "DELETE FROM {$escaped_collection_name} WHERE drupal_entity_id IN {$prepared_ids};"
+      query: "DELETE FROM {$escaped_collection_name} WHERE id IN {$prepared_ids};"
     );
     if (!$result) {
       throw new DeleteFromCollectionException(message: pg_last_error(connection: $connection));
