very slow updates
От | xav |
---|---|
Тема | very slow updates |
Дата | |
Msg-id | A4AAC8CD87A2D511B796004005420B1F64CED2@PMSERVER обсуждение исходный текст |
Список | pgsql-general |
Hi, I'm running PostgreSQL 7.2.1 with a redhat 7.2 box (PIII 800 / 256MB RAM / RAID1 IDE : promise TX2000). I'm new to Postgres, so perhaps I missed something... Here is the point : Using JDBC, I update one column for all the 1600 rows of a table (10 columns) : I'm running 1600 times a query like this : for (i=0 ; i<1600 ; i++) rs2.executeUpdate("UPDATE my_table SET my_date=now() WHERE id="+i); And it takes around 2 minutes !!! (Using ODBC, it also takes around 2 minutes) I tried to VACUUM the database just before the update, but it doesn't speed up the process... If I duplicate my table and I run several times my aplication again, here are the results : 1 - 11" 2 - 12" 3 - 14" 4 - 15" 5 - 16" 6 - 19" 7 - 1'15" 8 - 1'58" 9 - 1'45" 10- 1'57" (from this point, it stays around 2 minutes) Thank you for your help. Regards, Xavier Bugaud ______________________________________________________________________________ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif
В списке pgsql-general по дате отправления: