Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEA(Replying to this message)
@ryan-bush - in this case, we only need to compare the distance for owners and pets that belong to each other, so joining on Animal ID first and then doing the distance calc on just the ones that match is going to be much more efficient. There are 1,000 owners and 998 pets in the input data, but only 46 match each other, so we really only need to perform the distance calculation on those 46.
By using the trade area / spatial match, the workflow is having to compare all of the pets to all of the owners to see if they're within the trade area (plus, that gives you some owners matching to the wrong pets, just because they happened to be within 500 mi).
My manager is starting to have us do these challenges as part of a team-building exercise. So fun!!!
My cats were wondering, however, why I was spending so much time looking for other peoples' dogs. 🙂