Start a new topic

Filtering on Calculated Field causes Forms to take longer to load.

Hey,

We've discovered that filtering on a calculated field on a collection view takes quite a bit of time based on what's contained in that calculated field (such as a lookup).


However what we didn't expect was that when we try and open a record's form, if that filter is still selected, the form will also take a long time to open.


Is this expected behaviour?

1 Comment

Hello Josh,


Are you sure it is really linked to the filter done on the collection?


To ensure so, we usually advise to activate below loggers to capture the query ran on the DB:

<Root level="TRACE">

<Logger level="TRACE" name="org.springframework.jdbc.core.JdbcTemplate"/>

<Logger level="TRACE" name="org.springframework.jdbc.core.StatementCreatorUtils"/>


Careful, they are very verbose, so we usually advise to:

  • Do this test on a low environment with little activity.
  • Prepare as much as possible the use case in the UI.
  • Clear the PDE.
  • Activate the loggers.
  • Reproduce the use case.
  • Once done, quickly revert the logging configuration to default.
  • Extract the pde.
  • And if the file begins with the mention "This is a continuation of log file .../work/Catalina/localhost/semarchy/eclipse/workspace/.metadata/.bak_xxx.log", then extract all the content of this metadata folder (because the files get rewritten with the content of each new entry in the pde).


Once you have the logs, extract the query in question.

You may need to replace the parameters (?) by their values that are stated just below the query.


And once you have a runnable query, then execute it on DB side with an explain plan to check where the struggle is and if it is indeed or not said filter.

Login to post a comment