Loading ...
Sorry, an error occurred while loading the content.

Hibernate users?

Expand Messages
  • J. Jeff Roberts
    We re using Firebird with the jaybird JDBC driver and Hibernate 3.   I m currently working on the performance of our INSERTs.   - I ve made our DAO.save()
    Message 1 of 2 , Feb 1, 2009
    • 0 Attachment
      We're using Firebird with the jaybird JDBC driver and Hibernate 3.
       
      I'm currently working on the performance of our INSERTs.
       
      - I've made our DAO.save() method call session.clear() every 50 calls to save(), and that helped performance.
       
      - I've tried setting hibernate.jdbc.batch_size and hibernate.order_inserts and seen hibernate seem to be batching the inserts but saw no increase in performance.
       
      - I changed to using one of the new id generators that pools and saw it getting 50 ids per select call but didn't see an increase in performance.
       
      - I'm trying calling persist() instead of save() right now but so far no improvement.
       
      Am I overlooking anything else in Hibernate?
       
      Are there settings in the driver or Firebird that I need to set so that the batching has more effect?  We have very few indices.
       
      Thanks,
      Jeff Roberts




      [Non-text portions of this message have been removed]
    • Roman Rokytskyy
      ... Does not really matter for Firebird, since API does not have batch support. That means that driver emulates batches by sending commands one at a time. What
      Message 2 of 2 , Feb 2, 2009
      • 0 Attachment
        > - I've tried setting hibernate.jdbc.batch_size and hibernate.order_inserts and seen hibernate seem to be batching the inserts but saw no increase in performance.

        Does not really matter for Firebird, since API does not have batch
        support. That means that driver emulates batches by sending commands one
        at a time.

        What is your transaction setting? Do you manage transactions by yourself
        or you work in auto-commit mode?

        > - I changed to using one of the new id generators that pools and saw it getting 50 ids per select call but didn't see an increase in performance.

        That is good - it reduces the number of database roundtrips.

        > Are there settings in the driver or Firebird that I need to set so that the batching has more effect? We have very few indices.

        Nope. The most important thing is the transaction management - commit is
        quite expensive operation. I would even increase from 50 records per
        batch to something between 1000 and 10000.

        Roman
      Your message has been successfully submitted and would be delivered to recipients shortly.