What results do you get when you test it out? Run the queries a thousand times in each way, maybe with different data in case something is caching the results, and time both for comparison.
I’m not sure what database engine you’re using, but I’ve been doing some stuff with MS SQL Server recently and I’m told that does a thing called “connection pooling” which in theory means that although I’m connecting and disconnecting all over the place, the runtime optimises things.