diff --git a/process/Sql_lib/process.js b/process/Sql_lib/process.js
index a4cf96d6be498a7fc8db3ac2bddbe43c095e1173..c9dcace5ec008c34d4e7210a56469b485dfbefd9 100644
--- a/process/Sql_lib/process.js
+++ b/process/Sql_lib/process.js
@@ -2462,6 +2462,10 @@ SqlUtils.getSystemAlias = function()
      */
 SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol, pAsPrepared, pPreparedDbType) 
 {
+    var MAX_COUNT = 1000;
+    if (pData.length > 1000)
+        logging.log(translate.text("SqlUtils.getSqlInStatement: WARNING: You should not create in-statements with more than 1000 values. As this has a very bad performance."))
+    
     if (pData.length == 0)
         return " 1 = 2 ";
 
@@ -2476,7 +2480,6 @@ SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol, pAsPrepar
             throw new Error(translate.text("SqlUtils.getSqlInStatement: if pAsPrepared is true, pPreparedDbType has to be filld with the correct db type"));
     }
 
-    var MAX_COUNT = 1000;
     //pData.length -1 um für den Fall, dass MAX_COUNT == pData.length ist trotzdem nur einen Aufruf
     //zu machen
     var count = ((pData.length -1) / MAX_COUNT) >> 0;//aus kommazahl eine ganzzahl machen