Using an uplink connection is great to figure out how to build a query, not to check the performance.
Queries from an uplink connection will add roundtrips, which are by far the slowest part.
Queries from the browser will add the slow Skulpt loops to the slow roundtrips.
Queries in a server module will always be much faster. It’s always a good idea to create a function in a server module that does all the queries you need and all the iterations on the queries on the server side. Then call that function either from the uplink script or from the browser.