Performance Q&A guide

From a database/ data structure perspective, can someone explain to me why ‘Do a search for’ is so much quicker than referencing a Thing’s list of things?

I would assume the database just needs to refer to the current Thing and retrieve a connected list, where with Search for it searches through everything first.
I built most of my app around the concept of creating one main Thing with al kinds of other Things connected (Users, Invoices etc).
So what I always do in a workflow is add the secondary thing (as a list) to the main Thing. But because retrieving this so slow, I wonder if I should even do this.

The difference is enormous as you can see below.

This search box result retrieves a list of approx 300 items.

Data structure: Job Thing has Inventory Thing which has a List of Inventory Items

Left: Do a search for Inventory items with constraint of ‘Inventory is searchbox Job’s Inventory’
Right: Searchbox Job’s Inventory’s Inventory Items

3 Likes