Re: 1 big query or many small queries?

From: Joseph Weinstein (
Date: 10/13/03

Date: Mon, 13 Oct 2003 08:25:46 -0700
To: Rick Genter <>

Rick Genter wrote:

> I am developing a client/server application where my server needs to
> get data from a separate SQL Server 2000 server. I have the option of
> performing one large query, returning about 1500 rows, or 50 small
> queries, returning 30 rows each. I am using the Microsoft JDBC driver
> (version 2.02.0029). All server-to-server communication is over a LAN
> (no WAN connections involved). Should I prefer one technique to
> another?
> Thanks in advance.

If you really need all that data in the client (You can't process it in the DBMS),
and you don't need to worry about initial client response time while all those
rows are read in, do it al in one query.
Joe Weinstein at BEA

> Rick
> --
> Rick Genter
> Sr. Software Engineer
> Silverlink Communications
> rgenter "at"