Re: Client Side Cache ?? (was Re: How to limit # of rows ..)

From: Sundial Services <sundial_at_primenet.com>
Date: 1996/02/28
Message-ID: <sundial.2432.0025C33A_at_primenet.com>#1/1


In article <3134C84D.446B9B3D_at_jpmorgan.com> Dinesh Gulati <gulati_dinesh_at_jpmorgan.com> writes:

>> > > >> Does anybody know if there is a way to limit the number of records
>> > > >> returned by a SELECT statement? I have a large ODBC database
>> > >
>>
>> I am new to SQL Server, and this thread has me a little confused.
>>
>> Why should the number of rows returned be an issue ? Is this a memory
>> issue on the client ? Isn't this type of problem handled by something
>> like a cursor ?
>>
>> Just curious...
>> -jh
 

>Let us say your query resulted in a set of 1000s of records. In
>client-server environment, SQL server would return all the resulting
>rows to the client. You wanted to take this thing at the client side and
>build a popup. The user might just pick the item on the first page and
>be done with it. So in this case, no need to bring all the rows back.
>Obviously when the user pressed say <PgDn> you want to bring over the
>next page worth of rows....Makes sense...I know I went through this some
>time back, and didn't quite make full sense until I developed a front
>end.---DG

You are indeed correct that a server will not send, and a client will not request, more rows than are needed. You may have noticed that even MS-Access on the desktop will give you a pageful of information in a query tableview before it has finished the entire query in the background.

If you're in to this sort of thing, a book on relational-database and client-server implementations such as you might find at a very large bookstore or a University bookstore, is a truly astonishing book to read. Some of the things that server-writers think to do are, damned amazing.

/mr/ Received on Wed Feb 28 1996 - 00:00:00 CET

Original text of this message