Should you use an external connection with NHibernate and Sql Server 2008?

In choosing an external connection , the Nhibernate documentation says:

If your database supports ANSI or Oracle External Connections, an external query fetch can increase the performance limit of the number to and from the database (due to possibly more work being done by the database itself). Selecting an outer join allows you to graph many-to-one, one-to-many, or one-to-one associations that must be obtained in a single SQL SELECT.

I am trying to decide whether to use external binding in my current project (which uses NHibernate ). To do this, I'm going to test the boot time with and without an external connection. But I would like to know if this is a good or bad strategy overall when using Sql Server 2008 .

Is it generally better to use an external build than with Sql Server 2008?

How to determine whether to use it or not? (excluding performance testing and query profiling)

thanks

+4
source share
1 answer

Weird question. Use an external connection if necessary; some queries will require external bindings for some objects. Other requests will not be. Thus, if you do not need it, do not look forward to using external connections. You can specify the type of selection for each association when using the ICriteria API.

All this is an optimization issue that can be done later. I mean: suppose you have a graphic object where some parts are retrieved using lazy loading, and after testing, if it seems that lazy loading affects performance in a negative way on this particular graph of objects, check if you can what get something using impatient download (via choosing an external fi connection).

+4
source

Source: https://habr.com/ru/post/1301924/


All Articles