I did a take-home exercise earlier this week. They provided access to a database and said << do thing >>. Implied was that I should << do thing >> with a program rather than a query.
One of my solutions used Golang. It pulled data, looped a lot, then put results back. It took approximately 4 minutes.
I included a second solution, using SQL. It selected into the results table with a little bit of CTE magic. It took approximately 600ms.
Interesting, and I've seen and implemented similar optimisations plenty of times. The right query in the right place at the right time can make all the difference.
Did you hear back from them with a positive response?
One of my solutions used Golang. It pulled data, looped a lot, then put results back. It took approximately 4 minutes.
I included a second solution, using SQL. It selected into the results table with a little bit of CTE magic. It took approximately 600ms.