postgres 8 performance
От | Paramveer.Singh@trilogy.com |
---|---|
Тема | postgres 8 performance |
Дата | |
Msg-id | OFF7778EA0.BBBB4CF8-ONE5256F08.00340895@trilogy.com обсуждение исходный текст |
Ответы |
Re: postgres 8 performance
Re: postgres 8 performance Re: postgres 8 performance Re: postgres 8 performance |
Список | pgsql-general |
Hi all! I am running postgres 8 beta1 and for some reason it is really slow in execution. I am not able to figure out why. On a fresh install of postgres, the following code executed through jdbc ******************** for (int i=0; i < 10000; i++) { s.execute("insert into tab values (" + i + ",'" + i + "')") ; } **************** This took like 700 secs to execute. However, the weird part is that a stored proc doing the same thing via ****************************** create or replace function perftest() returns integer as ' declare i integer := 0 ; begin for i in 0..10000 loop execute ''insert into tab values ( '' || i || '' ,''''xxx'''' )'' ; end loop ; return 0; end ; does the same thing in less than a second. ************************************* I can't figure out what the problem is. The app using jdbc and the postmaster instance were running on the same comp so I can't believe that communication would make that big a hit on performance. Is there something else that I am doing wrong? Finally, where can I look up some useful performance tuning tips to get my server to run faster anyway? thanks a lot paramveer singh
В списке pgsql-general по дате отправления: