Query Performance is getting worse on average

Oof, that is a lot!

I never really did directly, just learned a bit more about optimizing within Retool's abilities and peccadilloes.

  1. Optimize your own queries best you can:
    Make sure your performance issue is not due to your back end. Optimize your indexes and all the normal stuff.
  2. Combine multiple queries so you are doing fewer trips to the server:
    For example I fetch all of my lookup tables in a single query: [how-to] Return multiple unrelated tables in one database call . You can also use upserts, use stored procedures or simply run more than one sql query at a time as your needs see fit.
  3. Have the app do a little less - do not cram your entire system into one app (that's an exaggeration of course!)
    I have tended to make my apps bigger so there was less page loading and thus fewer queries to the server. But as your app gets more components and even handlers, etc, it does get a little sluggish over all, so find your sweet spot. I am dialing back a bit and aiming for simpler apps.
  4. Avoid doggy components.
    For instance ListView and the old table will kill you if you are not really careful! it will seems like your queries are slow when it is the app. Hopefully the new ListView solves this like the new Table did for its ancestor.
2 Likes