The same query runs faster in Dev and Non-production Environments with similar number of records but in production environment it is taking more than 20 seconds where as in dev and non-production environment it takes less than 2 seconds any suggestion is really appreciable
Thank you in advance
Hello,
Usually it happens because PROD database has a lot more records than dev/tst environments. If that's not the case, you can double check on the code version and if the tables are properly indexed.
Otherwise I would suggest monitoring if there is slowness in other parts of the applications in PROD, may be a slowness in the overall environment. And you can always contact OutSystems support for a detailed step-by-step execution of the queries in the database, maybe you find the bottleneck.
Good luck,
Bogdan
If number of records are same, it might be problem with target DB or may be PROD environment health is not good. Sometime number of apps in enviroment also create slowness.
If query run by action called using timer then do check timers priority as well.