Refine your search results
As Matthew pointed out, your two connection points are the HTTP request from the client (web browser) to the server (web server) and the connection to the web server on the sql server.
Connecting to a webserver on sql server costs very little in the whole client-server-server-client-client. Therefore, it can be assumed that you are talking about a connection between the browser and the server. The only way to avoid this is to dump the entire database (or at least the unfiltered pool of records that can be queried) to the browser and do your client-side filtering - this is INCREDIBLE !! IDEA.
So my suggestion would be to stop worrying, write your application as usual, and if things look slow when you're done, you can start looking for where the slowness is coming from - instead of trying to guess (and probably is wrong) before the problem occurs.
a source to share