Received: from www.arcamax.com (arcamax.com [209.96.210.66]) by hub.org (8.9.3/8.9.3) with ESMTP id RAA48605 for ; Wed, 16 Feb 2000 17:23:04 -0500 (EST) (envelope-from bryan@arcamax.com) Received: from bryan2 (host45 [209.96.210.45]) by www.arcamax.com (8.9.3/8.9.3) with SMTP id RAA12894 for ; Wed, 16 Feb 2000 17:23:03 -0500 Message-ID: <005b01bf78cc$634cc3e0$2dd260d1@arcamax.com> From: "Bryan White" To: Subject: Managing the memory requierments of large query results Date: Wed, 16 Feb 2000 17:23:02 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 It is my understanding that when a query is issued the backend runs the query and accumulates the results in memory and when it completes it transmits the entire result set to the front end. For selects with large result sets this creates large demands for memory, first in the back end and then in the front end. Is there a mechansism to avoid this? In particular I am looking for a mechanism where the backend generates rows to fill a relatively small buffer and blocks while waiting for the front end to drain that buffer. In this interface the front end would only need to present one row at a time to the application. I understand that there might be limitations on the kind or complexity of a query that usses this mode of operation. I have studied the documentation and found Cursors and Asyncronous Query Processing. Cursors seems to solve the problem on the front end but I get the impression the back end will buffer the entire result until the cursor is closed. Asyncronous Query Processing as I understand it is more about not blocking the client during the query and it does not fundementally alter the result buffering on either end.