Re: JDBC and processing large numbers of rows

Поиск
Список
Период
Сортировка
От David Wall
Тема Re: JDBC and processing large numbers of rows
Дата
Msg-id 036601c43797$4312ee40$3201a8c0@rasta
обсуждение исходный текст
Ответ на Can't insert more than 80 registers!?  (Carlos Barroso <miguel.barroso@mail.pt>)
Ответы Re: JDBC and processing large numbers of rows
Список pgsql-jdbc
> Use cursors to page through really large result sets

Well, I've thought about that, but that just led me to my 3rd question in my
previous inquiry:

> > 3) How do people use cursors in JDBC?  Being able to FETCH seems like a
nice
> > way to handle question #2 above in a batch program, since only a subset
of
> > rows needs to be retrieved from the db at a time.  Cursors probably
don't
> > work for question #1 above since keeping a transaction alive across page
> > views is generally frowned upon and even hard to accomplish since it
means
> > locking up a connection to the db for each paging user.

The question for me is how do you portably use cursors so that you can work
with Oracle and PG seamlessly?  I presume there might be some (hopefully)
slight variations, like there are with BLOBs, but it would be nice if using
cursors was standardized enough to make it using standard JDBC.

It seems that the issues are with defining a cursor, executing it, fetching
against it, then release it when done.  Is there a standard way to do this?
Any examples?

Thanks,
David


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: JDBC and processing large numbers of rows
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: JDBC and processing large numbers of rows