On 6/7/07, Murray Cumming <[EMAIL PROTECTED]> wrote: > On Wed, 2007-06-06 at 23:31 +0200, Vivien Malerba wrote: > > On 5/25/07, Vivien Malerba <[EMAIL PROTECTED]> wrote: > > > On 5/25/07, Murray Cumming <[EMAIL PROTECTED]> wrote: > > > > I believe that libgda theoretically allows the use of cursors instead of > > > > getting the whole query result at once. I don't know what API would > > > > actually be used for this - an example would be nice. > > > > > > > > But I don't think that any of the libgda providers actually implement > > > > this. Does anyone have plans to do this, or can anyone suggest how it > > > > should be done? This seems to be the relevant bug: > > > > http://bugzilla.gnome.org/show_bug.cgi?id=318742 > > > > > > The default is if you don't specify a data access method, then a > > > random access data model is returned (possibly consuming a lot of mem) > > > which allows random access and of course cursor access. > > > > > > If you want a data model which is based on cursors only (no random > > > access then), you need to set a parameter named "ITER_MODEL_ONLY" of > > > type boolean to TRUE which is given to the > > > gda_connection_execute_command() family functions as the @params > > > attribute. The same is true for the gda_query_execute() function. > > > > > > This function then in the end calls > > > gda_server_provider_execute_command() which is passed the same @params > > > list of parameters. Each DBMS provider is then free to treat that > > > parameter or ignore it (as is currently the case). If a provider > > > chooses to honor that request, then the associated data model needs to > > > be improved to support cursor based nabigation (for example for > > > PostgreSQL, the GdaPostgresRecordset object needs to be modified). > > > > > > > It's now in SVN trunk (won't be in 3.0.2 but in 3.2.x). I've also > > added an "ITER_CHUNCK_SIZE" parameter which, if specified, instructs > > the provider to fetch SIZE rows at once instead of only one when the > > iterator moves to avoid performances problem related to many data > > fetches from the DB. > > Many thanks. This sounds perfect. I'll have time to try it in about 2 > weeks time. Thanks, again. >
Ok, tell me if you have any problem. Cheers, Vivien _______________________________________________ gnome-db-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-db-list
