I tried setting the adonet.batch_size=100 and 1000 and 2000 without
any effect .maybe its the generator =native , what should I set that
to for it to work?

thanks

scott

On Aug 21, 10:16 am, Fabio Maulo <[email protected]> wrote:
> two things:1- To have batcher working you should set adonet.batch_size="100"
> 2- That "native" smell bad (in MsSQL native=identity and it nullify the
> batcher)...
>
> where is the "guid" you have mentioned ?
>
> 2009/8/21 srf <[email protected]>
>
>
>
>
>
>
>
> > this is the commands:
>
> > session.SetBatchSIze(100);
> > ITransaction transaction = session.BeginTransaction()
> > session.save(auditEntry); //add about 2000 of these
> > session.Flush();
>
> > in my config;
> > <add key="adonet.batch_size"  value="1" />
>
> > this is my mapping file
> > <?xml version="1.0" encoding="utf-8" ?>
> > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" >
> >  <class name=".Persistence.Audit.AuditEntry, Persistence"
> > table="AUDIT_LOG" >
> >    <id name="Id" column="id">
> >      <generator class="native"/>
> >    </id>
> >    <property name="Message" column="message"/>
> >    <property name="EntityId" column="entityId"/>
> >    <property name="EntityType" column="entityType"/>
> >    <property name="EntityName" column="entityName"/>
> >    <property name="CommitPointName" column="commitPointName"/>
> >    <property name="CommitPointDescription"
> > column="commitPointDescription"/>
> >    <property name="FieldName" column="fieldName"/>
> >    <property name="OriginalValue" column="originalValue"/>
> >    <property name="NewValue" column="newValue"/>
> >    <property name="Created" column="created"/>
> >  </class>
> > </hibernate-mapping>
>
> > As far as I know this is what I need to get batched inserts but I
> > still dont, is there something Im missing.
>
> > thanks
>
> > scott
>
> > On Aug 20, 3:57 pm, Fabio Maulo <[email protected]> wrote:
> > > I would be sure of what you are using.Please send here (using copy&paste)
> > > the NH configuration and the id-mapping of each entity involved in what
> > you
> > > are testing.
>
> > > 2009/8/20 srf <[email protected]>
>
> > > > no, Im using Guids as the Id, should that effect trying to do batched
> > > > inserts?
>
> > > > thanks
>
> > > > scott
>
> > > > On Aug 20, 11:03 am, "Cesar Sanz" <[email protected]> wrote:
> > > > > Are you using auto-incremental ids?
>
> > > > > ----- Original Message -----
> > > > > From: "srf" <[email protected]>
> > > > > To: "nhusers" <[email protected]>
> > > > > Sent: Thursday, August 20, 2009 7:55 AM
> > > > > Subject: [nhusers] batch_size
>
> > > > > > I was tying out the nhProf and it was saying one optimization it
> > was
> > > > > > mentioning was to use  batching. For example , in one session I was
> > > > > > inserting 2000 records into the audit_log table and I was doing
> > 2000
> > > > > > seperate insert statements and it mentioned to us the setBatchSize
> > > > > > command so I used that then I got a message that I needed to set
> > the
> > > > > > ado.Batch_size too so I did that and all was well but I didnt
> > notice
> > > > > > any performance diference so I re ran the nhprof again. It again
> > said
> > > > > > to set the batch size since it was still generating 2000 insert
> > > > > > statements so setting the batch size didnt seem to do anything. I
> > did
> > > > > > some searches and found other people who set the batch size without
> > it
> > > > > > having any effect. Could it be something with the sqlserver driver?
> > Im
> > > > > > using the sql server 2005 dialect and im hitting sql server 2008 .
> > > > > > Also Im running 64bit if that matters.
>
> > > > > > Is there anyone else that had this problem as was able to solve
> > this?
>
> > > > > > thanks
>
> > > > > > scott- Hide quoted text -
>
> > > > > - Show quoted text -
>
> > > --
> > > Fabio Maulo- Hide quoted text -
>
> > > - Show quoted text -
>
> --
> Fabio Maulo- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to