Re: odd jdbc driver synchronization issue

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: odd jdbc driver synchronization issue
Дата
Msg-id Pine.LNX.4.33.0401061833100.6520-100000@leary.csoft.net
обсуждение исходный текст
Ответ на Re: odd jdbc driver synchronization issue  ("George Lessmann" <glessmann@hotmail.com>)
Список pgsql-jdbc

> Here's my work section, modeled after your example:
>
>     public void execute(int num) throws SQLException {
>         for (int i=0; i<num; i++) {
>
>             parentCall.execute();
>             // #1
>             for (int j=0; j<9; j++) {
>                 childCall.execute();
>                 // #1
>             }
>             // #2
>         }
>         // #3
>         conn.commit();
>     }

In this loop are you using i or j to indicate what rows to operate on in
the stored procedure calls?  If so there will be huge contention as each
thread will try to do the exact same things.  Using clientNumber*num+i or
something like that would give a more realistic test if you're supposed to
be dividing up work between these threads.

Kris Jurka


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

Предыдущее
От: "George Lessmann"
Дата:
Сообщение: Re: odd jdbc driver synchronization issue
Следующее
От: Oliver Jowett
Дата:
Сообщение: PreparedStatement parameters and mutable objects