Resource query runtime calculation in complex chains

If a Resource Query (to Retool DB, Workflow, JS, etc.) calls a 2nd Query in a chain, is this and all subsequent queries included in the calculation for runtime no matter how the Query is called (via onSuccess/Fail event handler of Query1, in direct call with .trigger() after awaiting Query1.trigger() OR with automatic triggering)?

Use Case

I'm wondering if by setting a variable and indirectly triggering a query will reset the runtime timer or if the timer starts immediately at query1 and only ends after ANY AND ALL subsequent query calls. I occasionally see things like '2 queries running' but I'm not sure what the number is including and what the built-in runtime limit is checking.

you can probably ignore what's below here unless you're just curious :man_shrugging:

here's sorta the psudo-framework I'm looking at:


the idea is the output of 1 model can design the instructions and input for another model to consume, being platform agnostic lets it choose diff models in different situations. imagine a list of instructions to generate a twitter post including text, image and video.... we'd generate the list using 1 model, then generate 3 types of content using 3 more models then generate the twitter post with a 5th model (as an example) but the combination of model choice at each step lets use/store a diff 'analytical view' of the same data we can later parse for datasets and fine-tuning for use in specific combinations. more data points gives us more chances to prune erroneous/outlying data, targeting response accuracy as a result (we create more data to remove data to constrain knowledge.... confusing and it kinda seems backwards but that's sort of the idea)

calls to externally hosted AI models can be time expensive and potentially memory expensive if manually managing a chat history crossing multiple models, so we isolate them in their own workflow so we know they have max available resources available. if we called step_entry.trigger() every single one of these queries will run... eventually. some triggered automatically when variables are set/changed, some 'manually' via 1 or more async .trigger() calls and some with onSuccess/Fail event handlers.... in complex scenarios, does the method in which a query was triggered affect the calculated runtime and are any of these ignored when checking for max runtime?

Hello @bobthebear!

Great question, I believe that our improved monitoring tools will display a single queries runtime from start to finish regardless of the manor in which it was invoked.

In the debugger inside of Timeline you can view how these queries fall on the timeline of events similar to how one could in their browser's inspect/network panel.

If you notice anything odd or inconsistent when testing things out via this method let me know and I can ask our engineering performance team about if our runtime reporting tool work differently for queries triggered via .trigger() or chained with a success/fail event handler :+1:

1 Like