Part-caching to speed up views

Last year we introduced ‘caching’ to views. In a nutshell, if a view is starting to slow down because e.g. it’s got really complex calculations in, or it works on a massive amount of data, then you can set it to ‘cache’ the results once a day or if you prefer, every 10 minutes (whilst data’s changing), so it loads instantly.

Of course, that’s only useful if you don’t need up-to-the-minute data – for reports like monthly sales totals etc. that’s fine.

However, what if there’s a more operational view that does need timely updating but contains slow calculations? There’s now a mix-and-match option to cache certain fields while keeping the rest fully up to date.

An example could be a list of products with a calculation to show the most recent order date and profit trend. When a product’s added, removed or edited, you want the changes to show up immediately but those two calculations are fine to update at a more leisurely pace.

The way to accomplish that is simple to create a secondary view containing only those calculations, set it to the caching time period of your choice and then join it in to the main view.

Voila – a view which loads quickly with recent data but can contain cached calculations working on maybe millions of records.

It’s important to note that this isn’t the only way of speeding up data retrieval. agileBase runs on ‘the world’s most advanced open source database‘ and there are many built in ways to optimise and increase performance. Sometimes, a simple tweak like adding an index can improve performance by a factor of a hundred!

So if there are any areas of your system which could do with a bit of care and attention performance wise, please do get in touch and I’m pretty confident we’ll be able to get it flying.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: