I have a winforms application that is doing the following:
on each query:
- Db connect
- Db query
- Db disconnect
as we are trying to avoid having to keep the db connection open. This suffers from performance as we have to connect / disconnect everytime.
What is the idealized model here to have the fastest performance but without having open connection for too long. Is there a best practice here?