Scoring things in the database using backend workflow

I’ve been trying to learn how to use recursive scheduled workflows but I am not fully comprehending how to set them up.

Here is my situation:
I have a list of things, each thing has a category and a location field. I am currently using a sample of my data but the live database will be quite large.

I have a formula for a score that I want to apply to each thing with a matching category and location. I was hoping to run this in the backend workflows because my front end page takes a long time to load and with the number of possible combinations it could mean reloading the page using dropdowns over and over hundreds of times.

How can I set up a backend workflow that will run on a list of things that match location1, category1 then location1, category2 then location1, category3 and so on until we run out of categories. Then it will run location2, category1 etc.

I might as well point out one complexity while I am at it. In each iteration the formula needs to gather the overall average of a 3rd field of data (rating) from this list of matching things.

Any help would be greatly appreciated. At least pointing me in the right direction to find a solution.

I thought I’d give a bit more detail to my post to see if it catches any attention.

I am using Google’s places data. I’ve taken a sample and stored it in my database just to learn how I can work with the data. I have two data types 1. Places 2. Reviews
Both have the unique identifier established by google the ‘Place_id’.
Places also have a ‘Category’ and ‘City’ that I use to compare a Place to similar Places in the database.

I came up with a formula that looks at the Reviews of each Place in a list of Places that is defined by searching for any Place that matches (Category, City).

Now I want to build a backend workflow to add a Score to each Place using the formula. In my sample data I have chosen a list of 10 categories and 10 cities to limit the size of the database.

My question is how to set up the recursive workflows that could search for a list of Places using the Category and City, then make changes to the Place by adding a Score to each Place in the list.

The formula uses a bayesian theorem to compare an individual Place’s review average to the average of similar Places.