SQL Server 2016 的版本和支持的功能

Editions and Supported Features for SQL Server 2016

我只是想知道 Basic R integrationAdvanced R 之间有什么区别官方 MS-SQL Server 2016 网站中提到的集成 功能?

带成分对照表的link是here

下面这段代码属于哪一类?

DROP TABLE IF EXISTS #TempTable

CREATE TABLE #TempTable (x NVARCHAR(MAX), y NVARCHAR(MAX))
INSERT INTO #TempTable
EXEC    [dbo].[proc_ReturnDataForCurveGraphsDoubleNorm]
    @sRAWFILEID = @sRAWFILEID, 
    @PREBLEACHVALUES = @sPREBLEACHVALUES, 
    @BLEACHVALUES = @sBLEACHVALUES, 
    @INITIALBLEACHVALUES = @sINITIALBLEACHVALUES

BEGIN TRY 
execute sp_execute_external_script    
  @language = N'R'    
, @script = N'
    df <- as.data.frame(c(InputDataSet));
    xdata <- as.numeric(as.character(df[,1]));
    ydata <- as.numeric(as.character(df[,2]));

    m = nls(ydata ~ yo - a * exp(-b * xdata),
    data = df, 
    start = list(yo = 0.9, a = 0.5, b = 0.563),
    trace = F,
    control = list(maxiter = 1000, warnOnly = TRUE), 
    lower = list(0, 0, 0),
    upper = list(1, 100, 100), algorith = "port");

    param <- coef(m);

    RSS.p <- sum(residuals(m)^2);
    TSS <- sum((ydata - mean(ydata))^2);
    r_square <- 1 - (RSS.p/TSS);

    yo <- param[1];
    a  <- param[2];
    b  <- param[3];

    xdata2 <- seq(0,max(xdata),0.01);

    fe2 <- yo - a*exp(-b*xdata2);
    mf <- ( (yo - fe2[1]) / (1 - fe2[1] ) ) ;

    thalf <- log(2) / b;

    OutputDataSet <- data.frame( round( yo , 4 ), 
    round( a, 4), 
    round( b, 4), 
    round( mf , 2 ), 
    round( thalf , 2 ), 
    round( r_square, 2) );
            '    
, @input_data_1 = N' SELECT * FROM #TempTable;  


 WITH RESULT SETS (([yo] NVARCHAR(MAX), 
 [a] NVARCHAR(MAX), 
 [b] NVARCHAR(MAX), 
 [mobile_fraction] NVARCHAR(MAX), 
 [t_half] NVARCHAR(MAX), 
 [r_square] NVARCHAR(MAX))); 



END TRY 

BEGIN CATCH  
SELECT ERROR_NUMBER() AS ErrorNumber, ERROR_MESSAGE() AS ErrorMessage;
END CATCH 
END

你应该看看 R Services section for such information, specifically Differences in R Features between Editions of SQL Server

据此,Standard 和 Express 具有流程限制和较低的可扩展性。您的代码将 运行 但它会变慢并且在 运行 执行繁重的训练任务时可能会使服务器饱和:

However, Standard Edition does not support Resource Governor. Using resource governance is the best way to customize server resources to support varied R workloads such as model training and scoring.

Standard Edition also provides limited performance and scalability in comparison to Enterprise and Developer Editions. Specifically, all of the ScaleR functions and packages are included with Standard Edition, but the service that launches and manages R scripts is limited in the number of processes it can use. Moreover, data processed by the script must fit in memory.

您可以使用 SQL Server Express 测试差异,例如在虚拟机中:

Express Edition with Advanced Services

Express Edition is subject to the same limitations as Standard Edition.

根据我在此 MSDN documentation 中阅读的内容,SQL 服务器中提供了许多层的 R 支持。我没有看到任何所谓的“高级 R 集成”,尽管 SQL 服务器企业版具有最强大的 R 支持:

Includes both R Services, for in-database analytics in SQL Server 2016, as well as R Server (Standalone) on Windows, which can be used to connect to a variety of databases and pull data for analysis at scale, but which does not run in-database. Also includes DeployR, which can be used to deploy R scripts and models as a Web Service.

No restrictions. Optimized performance and scalability through parallelization and streaming. Suopprts analysis of large datasets that do not fit in the available memory, by using the ScaleR functions.

In-database analytics in SQL Server supports resource governance of external scripts to customize server resource usage.

SQL 服务器的所有其他版本对 R 的支持比这更有限,只有上述功能的一个子集。大概其中之一将被认为仅具有基本集成。