1
0
-1

Hi,

I am using the Datalist JDBC binder because my query cannot be achieved using the Advanced Form binder. The query takes about 2 secs to run directly on the database but about 10 seconds in my Joget app - using a List in my Userview. This does not make a good UX. Everytime I click on a next page I have to wait another 10 seconds!

I was reading Datalist Performance Considerations - Knowledge Base for v5 - Joget | COMMUNITY and there is a line at the bottom that is intriguing me

Only use a derived query when it is absolutely necessary. Try to have the data set computed elsewhere or beforehand when possible.

What does that mean?

How can I have the dataset computed elsewhere to speed up the performance?

Can I create a database view in Joget?


    CommentAdd your comment...

    5 answers

    1.  
      1
      0
      -1

      Like I mentioned in my response to Anders, Joget is querying the DB 3 times and hence contributing to the poor performance. My queries do not return a lot of rows but they are complex. May be Joget gurus could  have a look at this part of the design. Here are 2 suggestions

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Only about 4000 rows! Here is a snapshot of my slow trace. The query time between 6 and 10 seconds. About 1.5-2 seconds when done directly on DB.


        1. Anders

          If you are transferring 4000 rows, then you might want to check your network connectivity between your database and application servers because that would be an obvious bottleneck. However, you may want to questions why you are returning 4000 rows in the first place. If you are only displaying 10 rows in your UI then you should try to limit the size of your query.

        2. CF

          The DB is on the same server as Joget. So no network issue here.

          The root cause is Joget which is calling the database 3 times. Twice to get the count and once to get the data. This issue is likely not noticeable for fast queries but those that take a few seconds will have a triple delay!

        CommentAdd your comment...
      2.  
        1
        0
        -1

        That is a slow... How many rows are you returning?

          CommentAdd your comment...
        1.  
          1
          0
          -1

          Anthony,

          I just tried your suggestion of creating a view. Unfortunately there is no noticeable difference in performance on the Datalist. I tried 2 things:

          1) Use JDBC binder and query the view directly

          2) Created a new form, hook it to the view and use form binder for the datalist

          Both have same bad performance.

          So looks like Joget is adding an overhead of approx. 8 seconds to displaying the list! 

            CommentAdd your comment...
          1.  
            1
            0
            -1

            not knowing how complex of a query you have designed, I couldnt provide any input. however, what worked for me is creating the views in your database so that all the joins and other time consuming calculations occur on the server. in joget it is a simple matter of calling that view with some filtering parameters if needed. 

            in any case, if the query is slow on the database server, it wont get any better (actually it will be degraded) on the client side.

              CommentAdd your comment...