From: Martijn Tonies Date: September 3 2004 12:37pm Subject: Re: Fetch-on-demand List-Archive: http://lists.mysql.com/mysql/172049 Message-Id: <040301c491b2$c8b35a60$0a02a8c0@martijn> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, > > Does MySQL support fetch-on-demand of resultsets? > > > > And if so, does it support multiple cursors fetching on the same time > > using the same connection? > > > > If so, is it thread safe? > > What do you mean "fetch-on-demand"? I've never heard this term before. Since > every fetch takes place when your program calls for it, isn't every fetch > already "fetch-on-demand"? There are two ways to fetch a resultset - 1) fetch the entire resultset, close the handle (or whatever) and cache the resultset locally so you can do your stuff. 2) keep the resultset open and fetch rows on a need-to-handle basis. Sometimes also called a "server side cursor". Usually forward only. From my understanding, I believe MySQL can do (2), but my question was if it can do (2) for multiple cursors at the same time, or having a cursor open and execute other statements, on the same connection. And if so, if this is multi-thread-safe on a connection/network level. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com