Lim Berger wrote:
INSERTing into MySQL takes 0.0001 seconds per insert query. INSERTing into PgSQL takes 0.871 seconds per (much smaller) insert query. What can I do to improve this performance? What could be going wrong to elicit such poor insertion performance from Postgresql? Thanks. ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend
The first thing I would ask is what type of DB engine are you using while doing the inserts on MySQL? The reason MySQL is doing the inserts faster is it does not have transaction support if you are using anything other than InnoDB.
With that said you can increase your insert performance by simply using a transaction and committing every 1000 rows or so.
If you do this you will see a huge performance increase. hope that helps. Tony Caduto AM Software Design http://www.amsoftwaredesign.com Home of Lightning Admin for PostgreSQL and MySQL ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings