Re: Synthesize support for Statement.getGeneratedKeys()?

Поиск
Список
Период
Сортировка
От Ken Johanson
Тема Re: Synthesize support for Statement.getGeneratedKeys()?
Дата
Msg-id 45BCC675.5050000@kensystem.com
обсуждение исходный текст
Ответ на Re: Synthesize support for Statement.getGeneratedKeys()?  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
>> In implementing Statement.executeUpdate(String sql,String[]
>> columnNames), does any know how I could go about sending the sql and
>> subsequent RETURNING clause directly to a stream? Just so I can avoid
>> double-buffering the query (allocated in the sql, and second in the
>> StringBuffer I'd be appending the RETURNING clause to).
>
> Don't worry about this minor overhead.  So much other manipulation and
> object creation happens (even forgetting the network trip) that this
> will be in the noise.
>


Hmm, this might be an area I'd enjoy contributing code for.. if there
are places now where there is avoidable double or triple allocation
(like in my patch) (where it could instead be handled by streams and/or
finer grained chunks), and since the driver (apparently) already has
some stream based utils... maybe I could try to improve those.

I know from experience with other tools that unnec allocation can play
havoc under high load and/or very large data sets, using (resizeable)
buffers (like StringBuffer). When that code gets optimized the
application becomes much more responsive.

If you know of any places in the driver that could benefit from this,
please let me know.

ken



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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: escape string for pgsql (using jdbc/java)?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Strange result from DatabaseMetaData.getTablePrivileges()