Re: How to speed-up inserts with jdbc

Поиск
Список
Период
Сортировка
От Edwin Eyan Moragas
Тема Re: How to speed-up inserts with jdbc
Дата
Msg-id 376dd19504111100044aa0ca1e@mail.gmail.com
обсуждение исходный текст
Ответ на How to speed-up inserts with jdbc  (Michael Kleiser <mkl@webde-ag.de>)
Ответы Re: How to speed-up inserts with jdbc
Список pgsql-performance
On Wed, 10 Nov 2004 14:51:57 +0100, Michael Kleiser <mkl@webde-ag.de> wrote:
>                Statement  st = con.createStatement();
>                java.sql.Timestamp datum = new java.sql.Timestamp(new Date().getTime());
>                Date start = new Date();
>                System.out.println(start);
>                for (int i=0; i<100; ++i) {
>                    st.executeUpdate("insert into history(uuid,coni,date,direction,partner,type)
values('uuid','content','"+datum+"','dir','partner','type')");
>                }

how about using PreparedStatment? that's on the java end.
on the pg end, maybe do a BEGIN before the for loop and
END at the end of the for loop.
--
i'm not flying. i'm falling... in style.

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

Предыдущее
От: Mike Rylander
Дата:
Сообщение: Re: int4 in a GiST index
Следующее
От: Gaetano Mendola
Дата:
Сообщение: Re: seqscan strikes again