> Are those wrapped in a transaction or not? Each transaction forces a fsync
> when committing, and if each of those INSERT/UPDATE statements stands on
> it's own it may cause of lot of I/O.
Yes, it's wrapped inside a transaction. May be this could be a reason for slowdown, as you've highlighted here.
Atleast,we've got some guidance here to troubleshoot in this aspect also.
> There are tools that claim to remove the object vs. relational discrepancy
> when accessing the database. They often generate queries on the fly, and
> some of the queries are pretty awful (depends on how well the ORM model is
> defined). There are various reasons why this may suck - loading too much
> data, using lazy fetch everywhere etc.
Thanks for the clarification.
> Are you using something like Hibernate, JPA, ... to handle persistence?
No, we're not using any persistence frameworks/libraries as such.