title: Hibernate on dynamic partitioning of database tables
body: <p>We have a transaction table where daily insertions are around 1 million transaction. We have done the partitioning on the basis of insertion date.</p>
  
  <p>This has resolved our issue in insertion time. However, we are still facing below issues:
  1. Hibernate Criteria select still scans all the partitions.
  2. We are creating partitioned tables daily manually, so while table creation, all the inserts are getting blocked and table is getting locked and we are facing slowness.</p>
  
  <p>The entity table mapping is over the parent table.</p>
  
  <p>Is there a way, we initiate all database operations like select, insert, updates over partitioned tables only without locking the tables and how the entity table should look like.</p>
  
  <p>Note: We are using postgresql database.</p>