Backendless - performance database select

Hello,

I wanted to ask regarding the Backendless db performance. I observed that the REST API calls that I am making are taking a huge amount of time (looking at the operations they do), over 1-2sec.

The one issue is for sure connectivity which is showing over 500ms to get a response from Europe.
However, another issue which concerned me even more is the time which takes db to return a selection.

I performed simple test using business logic and codeless to create simple select (without any parameters).
Results below (misilsecs show the current time in milisecs)
23:07:09 | start | DEBUG | 131 (milisecs) - first log at the beginning at the service
23:07:09 | start | DEBUG | 131 (milisecs) - some code that is operating variables - I wanted to check how the code behaves
23:07:09 | start | DEBUG | 131 (milisecs) - another part of codes that are just manipulating variables to see the speed of program
23:07:09 | start | DEBUG | 235 (milisecs) - this is after “Load Table objects” block invocation. There are just 3 objects in the table and it took around 100ms to retreive those which is more that I was expecting - I did more iterations of that and avarage time here is usually around 200ms.
23:07:09 | SERVER_CODE | INFO | [2256] Processing finished in 130.629ms

Can you please let me know whether this can be optimized somehow and how this timing would look like while scaling up (e.g. 10 000, 100 000, 1 000 000 records in the table)? (I found out one thread where Mark uploaded a video of how the db works on over 2m elements but the video was not working anymore).

Having the page which would need to utilize details from 4 different tables (4 different selects), combining those in the single API call would take aroud 500ms to process the server code itself. I am looking whether the selection on the db itself can be shorter or this is expected bahaviour.

Thank you in advance,
Jakub

Hi Jakub,

I am looking at the log you shared and I believe the numbers between 100-200ms are great considering you’re running the code in a shared hosting environment. I do not know what your schema looks like and what additional parameters you’re passing into the query (such as relations or where clause), but I believe the numbers you’re seeing is already pretty good. Btw, you can try adding indexes to the columns you search by the most and it should speed up data retrieval.

Regards,
Mark

Thanks Mark - I was not passing any additional parameters, just to try simple select.
Anyway, thank you for your observation regarding the shared environment as I did not take that into consideration. I have sent separated email to Sales Team to get more details about possibilities and the pricing.

Best Regards,
Jakub