[ClearLogs] Time outs

[ClearLogs] Time outs

  
Forge Component
(1)
Published on 2016-10-16 by Claudio Lichtenthal
1 vote
Published on 2016-10-16 by Claudio Lichtenthal

If anyone had problems using this component because of timeouts here are some things I did. Also I was using the version for sql server. I am on the outsystems PaaS and have limited database rights to the cloud db.


If the homepage won't load because of a timeout (504 error i think it was) , it might be because it can't count the log records fast enough. You can go into preparation of homepage open the "list records" advanced sql. Replace the count (*) ... with 

SyntaxEditor Code Snippet

SELECT rowcnt FROM sys.sysindexes WHERE id = OBJECT_ID(@TableName) AND indid < 2


Also I changed the assign variable of Table Name to 

SyntaxEditor Code Snippet

"'oslog"+GetLogTableTypes.List.Current.LogTableType.TablePrefix+cycle+"'"


The variable has to be wrapped in single quotes if you use the rowcount im suggesting. This is way faster and will come in handy if you have millions of log records.