Oskar, thank you so much! And sorry, I'll use the nhusers list next time

четверг, 6 декабря 2018 г., 9:47:11 UTC+3 пользователь sweetto...@gmail.com 
написал:
>
> Hello
>
>
> Let’s say we have a simple *test* table in our database and we use a 
> simple Hibernate object in order to work with it.
>
> The addition of 150 entries (150 *ISession.Save()* calls) in a single 
> transaction can easily take *100-200 milliseconds* (in case of *MySQL* and 
> in case of *Postgresql* database)…
>
>
> Is this normal, or are we missing something and we should change something 
> in Hibernate / our database in order to improve the performance of the rows 
> addition operation?
>
> We have tried to disable flushing and call it before the Commit(), but it 
> hasn’t changed much…
>
>
> [Class(Table = “test”)]
> public class TestEntity
> {
>   private int id;
>   [Id(0, Column = “id”, Name = “Id”)]
>   [Generator(1, Class = “native”)]
>   public virtual int Id { get { return id; } set { id = value; } }
>
>
>   [Property(Column = "test_column")]
>
>   protected virtual float testColumn { get; set; }
>
>   public virtual float TestColumn { get { return testColumn; } set { if 
> (testColumn != value) { testColumn = value; } } }
>
>
>   public TestEntity() { }
>
>
>   public TestEntity(float t)
>
>   {
>
>     this.testColumn = t;
>
>   }
>
> }
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nhibernate-development+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to