Neither.

That is a system SP used to execute parameterized queries. ADO.NET uses it
ALWAYS, except when calling stored procedures.

   Diego


On Tue, May 11, 2010 at 06:02, graphicsxp <[email protected]> wrote:

> So the bottom line is ... ?
> Should I understand it as NH does NOT call this SP, and this is only
> done by SQL Server, right ?
>
> Kim, sorry but what do you mean by IIRC ? ;)
>
> Thanks
>
>
> On 11 mai, 09:45, Kim Johansson <[email protected]>
> wrote:
> > Ah, that's the exec_sql() SP thing, that's a SQL Server thing, not NH if
> IIRC.
> >
> > Med vänliga hälsningar,
> > Kim Johansson
> > Industritorget Sweden AB
> > Söndrumsvägen 29
> > 302 39 Halmstad
> > tel:  035 - 260 32 00
> > fax: 035 - 12 24 83
> > epost: [email protected]
> > webb:http://www.industritorget.se
> >
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On
> Behalf Of graphicsxp
> > Sent: den 11 maj 2010 09:07
> > To: nhusers
> > Subject: [nhusers] Re: What does NH in the background ?
> >
> > A colleague of mine told me that he once used the SQL Server profiler to
> see what SQL was generated by NH. He saw that the SQL was embedded within a
> SP.
> > Honnestly I found it strange too, so I just wanted to double check with
> other people.
> >
> > Thanks !
> >
> > On 11 mai, 02:25, sbohlen <[email protected]> wrote:
> > > Whoever told you that is probably confusing the statement (true) that
> > > "NH generates parameterized SQL statements" with "NH generated sprocs"
> > > (not true).
> >
> > > Among other things, parameterized SQL statements permit modern DB
> > > engines (like MS SQL Server and many others) to cache the query plan
> > > for the statement.  This means that the the DB only needs to generate
> > > a query plan ONCE for each NH query (the first time each query is
> > > executed).  Since pre-calculated query plans are often the primary
> > > source of perceived performance gains from using sprocs, this specific
> > > advantage of sprocs is mitigated by NH generating parameterized SQL
> > > queries.
> >
> > > In this manner, much of the performance benefit of sprocs is also
> > > achieved by NH and this is (my guess) the origin of the statement to
> > > which you are referring.
> >
> > > -Steve B.
> >
> > > On May 10, 11:24 am, graphicsxp <[email protected]> wrote:
> >
> > > > Hi,
> >
> > > > I was told that when using NH along with SQL Server, the generated
> > > > SQL was always embeded within a stored procedure. Is this true ? And
> > > > if so, which one ?
> > > > I've always thought the SQL was generated and then executed right
> > > > away....
> >
> > > > Thanks
> >
> > > > --
> > > > 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]<nhusers%[email protected]>
> .
> > > > For more options, visit this group athttp://
> groups.google.com/group/nhusers?hl=en.
> >
> > > --
> > > 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]<nhusers%[email protected]>
> .
> > > For more options, visit this group athttp://
> groups.google.com/group/nhusers?hl=en.
> >
> > --
> > 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]<nhusers%[email protected]>
> .
> > For more options, visit this group athttp://
> groups.google.com/group/nhusers?hl=en.
> >
> > --
> > 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]<nhusers%[email protected]>
> .
> > For more options, visit this group athttp://
> groups.google.com/group/nhusers?hl=en.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
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