My task is to lower the execution time for this workfow.
What I’ve tried far:
Customizing PostgreSQL config file with
I found on-line tool config generation tool https://www.pgconfig.org/ and applied it with Docker command. After I checked the config from PostgreSQL itself SHOW all; I ran task again and got same 105 seconds and maximum 200 transactions per second in average
Has the downside of needing to add a third-party software to the stack, so you're no longer solely using Wappler - more loose parts, more chance of breaking stuff
Here, one more feature request:
You can start betting which one is going to be picked first
Thanks for topic link, but I think my case is a little bit different.
This will be backend workflow without any interaction with Web UI
I’m creating randomized array from SQL query output, then I’m going trough this array and using {{index}} in update action and I doubt this can be replace with any other workaround.
You can call stored procedures directly in Wappler using the customer query action. I use this approach regularly when trying to maximise DB performance
I agree with @scalaris that a stored procedure is quite performant although it has caveats. But for this case @Notum I would certainly consider it.
@George have you guys considered adding an sql editor to test and run queries in the DB manager. Specially to create functions and triggers. I think they have their space in Wappler. Users could create functions and then you guys could create an SC action wrapper function to call these and return the results. Similar to what supabase does.
Just my thoughts on building this additional feature. The Wappler team’s ‘can do’ attitude is great and they appear to love a challenge - BUT, these decisions should always be tempered by the wider needs of the Wappler platform.
It’s so simple to call a stored procedure or function via the custom query action that any experienced Wappler user isn’t going to want to have the relative unknown of a Wappler wrapper in the middle - offering little or no additional functionality and potentially causing issues.
It’s much the same as the Stripe library of actions - they offer nothing that the API action cannot do. It’s simply like-for-like wrappers that introduce their own issues - To work best with Stripe you need to understand their APIs - I’ve built a significant Stripe integration with API actions having been frustrated with Wappler’s intermediary issues. It was much quicker and less stressful to do so. Now I expect some will question this but I’ve been there and done it - how many of the Wappler team eat their own dog food.
What would be far more useful would be documented and working examples of using Stripe with the API action. This, however, as we know isn’t a strong point for the team. But it’s actually what Wappler’s paying customers need as is evidenced on the support forums. Sometimes it’s not about the code - it’s the documentation. the same for custom queries with stored procedures and functions.
Just to clarify - I LOVE WAPPLER. I use it daily and have built a large system with it. But it’s the business decisions they make that frustrate me - they need to focus more on the actual needs of the customer and on solving them.
Great companies never want to push their ideas onto customers, they simply give them what they actually need.
experienced Wappler user != experience DB administrator
It might be relatively easy to execute stored DB function from Wappler but it might be difficult to write such function in SQL.
You asked for suggestions to decrease execution time of this workflow. You didn't specify experience as a requirement. but looking at the server action above, it's fairly trivial and there's loads of documentation available.
In all seriousness though, I appreciate you pointing out that they are a management nightmare… it did curtail my initial enthusiasm for them to a suitable level.
As for tuning performance… while it doesn’t answer the original question:
The thing that has made my app go at the speed of light is creating loads of database views. They take a good knowledge of SQL, but for a large app, have literally saved the day.
I guess all you 20-year-full-stack-experience-developers know that already, but for us newbie-app-entrepreneurs, it is the little secret that Wappler doesn’t address and makes your app run at warp speed!