Very slow database performance

I can’t say whether you’re seeing a legitimate issue or not, but you are returning the entire table’s worth of rows when the user is only viewing the first page of them.

Personally, I’d return the search iterator so that Anvil could retrieve only the rows needed and allow the data grid to retrieve more when the user asks for them.

So, instead of:

jobs_dict = [dict(r) for r in app_tables.jobhistorymaster.search(tables.order_by("jobDate",ascending=False))]

I’d use:

jobs_dict = app_tables.jobhistorymaster.search(tables.order_by("jobDate",ascending=False))