Computed columns: SQL or locally in the Entity Framework?

I have several computed columns of two types:

  • Computed columns based on columns in the current table (i.e. price * tax)
  • Computed columns based on other columns (i.e. price * fn_GetTax (OrderId))

Could you say that it is better to use these columns in the CLR only on the client, and then save the calculation and transfer of performance from the server? Does this differ in the types (and other types) listed above?

+3
source share
1 answer

SQL, , , .

- , SQL . , , () T-SQL , SQL Server, , , ( PERSISTED).

, , .., , , .NET. CLR SQL Server - SQL Server ( , ), EF, , , , .

, !

+4

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


All Articles