I am calling a stored procedure from SQL widget for bulk insert. Now I am getting warning in Architecture Dashboard as follows -
How to solve the issue?
Hi Sourav,You can limit the results in the by fetching the TOP (X) no of records which you need to fetch. Please refer below image.
Hope it helps!
ThanksRegards
N_G
Hi @Sourav Pasari ,
If my suggestion has resolved your query, could you please mark it as the solution?ThanksN_G
Hello Sourav Pasari,
When a query returns an unrestricted number of rows, it can lead to excessive CPU usage, high I/O consumption on the database, and unnecessary memory consumption on the web server. This is because the entire result set of the query needs to be held in memory on the server, even if only a small subset of the data is actually needed. For example, retrieving 1,000 records in each call when only the first 10 records are required can result in significant resource waste. You can check more about this on the following link:
But, in my personal opinion, the "Unlimited records in SQL query" warning is one of the less useful warnings provided by the Architecture Dashboard/AI Mentor because 90% of the time you are already controlling how many records/lines you are retrieving from the aggregate/SQL. So, if you know what you're doing, unlimited aggregates are fine. It's just a warning that something may need attention. You can check the comment provided here as solution. :)
Best regards,
Ana
Due to the execution of a stored procedure, AI Mentor Studio lacks awareness of your insertion but incorrectly assumes a selection. To address this, you can resolve the issue by either adjusting the maximum number of records to 1 or by setting the warning status to "Won't fix."