{"id":272090,"date":"2016-01-13T21:42:02","date_gmt":"2016-01-13T18:42:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=272090"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=272090","title":{"rendered":"\u0427\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 0 \u0438\u043b\u0438 NULL?"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a80\/686\/6ba\/a806866bac4a4449bc615f9c45a7744f.png\" align=\"left\"\/>\u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435: <i>COUNT<\/i>, <i>SUM<\/i> \u0438 <i>AVG<\/i>. \u0418 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u0434\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0443\u0436\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0430\u0441\u044c <a href=\"http:\/\/habrahabr.ru\/post\/271797\/\">\u0440\u0430\u043d\u0435\u0435<\/a>, \u0442\u043e \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043d\u044e\u0430\u043d\u0441\u044b. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443\u2026<\/p>\n<p>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u043f\u043b\u0430\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430, \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430: <i>Stream Aggregate<\/i> \u0438 <i>Hash Match<\/i>.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c <i>Stream Aggregate<\/i> \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430 \u043d\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<p>  \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, <i>Hash Match<\/i> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c (\u0437\u0430 \u0440\u0435\u0434\u043a\u0438\u043c <a href=\"http:\/\/sqlblog.com\/blogs\/paul_white\/archive\/2011\/12\/04\/is-distinct-aggregation-still-considered-harmful.aspx\">\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c<\/a>) \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b <i>Hash Match<\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u043a, <i>Hash Match<\/i> \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 <i>tempdb<\/i>.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <i>Stream Aggregate<\/i> \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 <i>Hash Match<\/i> \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043d\u0435 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043b\u0438 \u0442\u0435\u043e\u0440\u0438\u044e \u043d\u0430\u0447\u043d\u0435\u043c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0446\u0435\u043d\u0443 \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432: <\/p>\n<pre><code class=\"sql\">SELECT AVG(Price) FROM dbo.Price <\/code><\/pre>\n<p>  \u041f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<pre><code class=\"sql\">CREATE TABLE dbo.Price (     ProductID INT PRIMARY KEY,     LastUpdate DATE NOT NULL,      Price SMALLMONEY NULL,     Qty INT ) <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043d\u0430\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u0430\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u044f, \u043d\u0430 \u043f\u043b\u0430\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u0443\u0432\u0438\u0434\u0438\u043c <i>Stream Aggregate<\/i>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a1c\/468\/21a\/a1c46821acbd425bac16037496a5d3f6.png\"\/><\/p>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0432\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <i>COUNT_BIG<\/i> \u0438 <i>SUM<\/i> (\u0445\u043e\u0442\u044f \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043a\u0430\u043a \u043e\u0434\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f) \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 Price:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a8a\/c40\/5ab\/a8ac405aba744f7ea4c672844d3fa510.png\"\/><\/p>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <i>NOT NULL<\/i>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f <i>COUNT_BIG<\/i> \u0438\u0434\u0435\u0442 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443, \u0430 \u043d\u0435 \u0441\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u043e\u0439. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">SELECT AVG(v) FROM (     VALUES (3), (9), (NULL) ) t(v) <\/code><\/pre>\n<p>  \u0432\u0435\u0440\u043d\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0435 4, \u0430 6.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <i>Compute Scalar<\/i>, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u043e\u043b\u044c:<\/p>\n<pre><code class=\"sql\">Expr1003 =     CASE WHEN [Expr1004]=(0)         THEN NULL         ELSE [Expr1005]\/CONVERT_IMPLICIT(money,[Expr1004],0)     END <\/code><\/pre>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0441\u0443\u043c\u043c\u0443:<\/p>\n<pre><code class=\"sql\">SELECT SUM(Price) FROM dbo.Price <\/code><\/pre>\n<p>  \u041f\u043b\u0430\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0436\u043d\u0438\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/117\/c78\/985\/117c78985a9e4179bc492120142fda6c.png\"\/><\/p>\n<p>  \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <i>Stream Aggregate<\/i>\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a51\/325\/460\/a51325460e8346c6bc3d001498a1f7f7.png\"\/><\/p>\n<p>  \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043f\u0435\u043b\u044c\u043a\u0443 \u0443\u0434\u0438\u0432\u0438\u0442\u044c\u0441\u044f. \u0417\u0430\u0447\u0435\u043c <i>SQL Server<\/i> \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0435\u0441\u043b\u0438 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u043c\u043c\u0430? \u041e\u0442\u0432\u0435\u0442 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 <i>Compute Scalar<\/i>:<\/p>\n<pre><code class=\"sql\">[Expr1003] = Scalar Operator(CASE WHEN [Expr1004]=(0) THEN NULL ELSE [Expr1005] END) <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435 \u0431\u0440\u0430\u0442\u044c \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 <i>COUNT<\/i>, \u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0435 \u044f\u0437\u044b\u043a\u0430 <i>T-SQL<\/i>, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442 \u0441\u0442\u0440\u043e\u043a \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c <i>NULL<\/i>, \u0430 \u043d\u0435 <i>0<\/i>. \u0422\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0434\u043b\u044f \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0439, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"sql\">SELECT LastUpdate, SUM(Price) FROM dbo.Price GROUP BY LastUpdate OPTION(MAXDOP 1) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"sql\">Expr1003 = Scalar Operator(CASE WHEN [Expr1008]=(0) THEN NULL ELSE [Expr1009] END) <\/code><\/pre>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0434\u043b\u044f <i>NULL<\/i>, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f <i>NOT NULL<\/i> \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 <i>SUM<\/i> \u0438 <i>AVG<\/i>. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435, \u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>COUNT + SUM<\/i>:<\/p>\n<pre><code class=\"sql\">SELECT SUM(Price) \/ COUNT(Price) FROM dbo.Price <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c, \u0447\u0435\u043c \u044f\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <i>AVG<\/i>.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435\u2026 \u042f\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c <i>NULL<\/i> \u0432 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"sql\">SELECT       SUM(CASE WHEN Price &lt; 100 THEN Qty ELSE NULL END),       SUM(CASE WHEN Price &gt; 100 THEN Qty ELSE NULL END) FROM dbo.Price <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"sql\">SELECT       SUM(CASE WHEN Price &lt; 100 THEN Qty END),       SUM(CASE WHEN Price &gt; 100 THEN Qty END) FROM dbo.Price <\/code><\/pre>\n<p>  \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a09\/247\/74a\/a0924774add04d848d4ac86117545dee.png\"\/><\/p>\n<p>  \u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c 0 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0432\u043c\u0435\u0441\u0442\u043e <i>NULL<\/i>? \u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <i>ELSE<\/i> \u0438 \u043d\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442\u0441\u044f:<\/p>\n<pre><code class=\"sql\">SELECT       SUM(CASE WHEN Price &lt; 100 THEN Qty ELSE 0 END),       SUM(CASE WHEN Price &gt; 100 THEN Qty ELSE 0 END) FROM dbo.Price <\/code><\/pre>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u043c \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e\u2026 \u0434\u0430 \u0438 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u043c\u043e\u0437\u043e\u043b\u0438\u0442\u044c \u0433\u043b\u0430\u0437\u0430:<\/p>\n<pre><code class=\"sql\">Warning: Null value is eliminated by an aggregate or other SET operation. <\/code><\/pre>\n<p>  \u0425\u043e\u0442\u044f \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">SELECT       ISNULL(SUM(CASE WHEN Price &lt; 100 THEN Qty END), 0),       ISNULL(SUM(CASE WHEN Price &gt; 100 THEN Qty END), 0) FROM dbo.Price <\/code><\/pre>\n<p>  \u0418 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>CASE<\/i> \u0441\u0442\u0430\u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041c\u044b \u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0442\u0443\u0434\u0430 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <i>ELSE NULL<\/i> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c\u2026 \u0422\u0430\u043a \u0432 \u0447\u0435\u043c \u0436\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430?<\/p>\n<p>  \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 <i>NULL<\/i> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435. <\/p>\n<pre><code class=\"sql\">SET STATISTICS TIME ON  DECLARE @i INT = NULL  ;WITH     E1(N) AS (         SELECT * FROM (             VALUES                 (@i),(@i),(@i),(@i),(@i),                 (@i),(@i),(@i),(@i),(@i)         ) t(N)     ),     E2(N) AS (SELECT @i FROM E1 a, E1 b),     E4(N) AS (SELECT @i FROM E2 a, E2 b),     E8(N) AS (SELECT @i FROM E4 a, E4 b) SELECT SUM(N) -- 100.000.000 FROM E8 OPTION (MAXDOP 1) <\/code><\/pre>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u043d\u044f\u043b\u043e:<\/p>\n<pre><code class=\"sql\">SQL Server Execution Times:    CPU time = 5985 ms, elapsed time = 5989 ms. <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"sql\">DECLARE @i INT = 0 <\/code><\/pre>\n<p>  \u0418 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e:<\/p>\n<pre><code class=\"sql\">SQL Server Execution Times:    CPU time = 6437 ms, elapsed time = 6451 ms. <\/code><\/pre>\n<p>  \u041d\u0435 \u0442\u0430\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u043e \u043f\u043e\u0432\u043e\u0434 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0446 \u0441\u043f\u0435\u043a\u0442\u0430\u043a\u043b\u044f \u0438 \u0437\u0430\u043d\u0430\u0432\u0435\u0441? \u041d\u0435\u0442. \u042d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435\u2026<\/p>\n<p>  \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u043e\u0434\u0438\u043d \u043c\u043e\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439: <i>\u00ab\u041d\u0435\u0442 \u043d\u0438 \u0447\u0435\u0440\u043d\u043e\u0433\u043e, \u043d\u0438 \u0431\u0435\u043b\u043e\u0433\u043e\u2026 \u041c\u0438\u0440 \u043c\u043d\u043e\u0433\u043e\u0446\u0432\u0435\u0442\u0435\u043d\u00bb<\/i> \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 <i>NULL<\/i> \u043c\u043e\u0436\u0435\u0442 \u0432\u0440\u0435\u0434\u0438\u0442\u044c.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<pre><code class=\"sql\">USE tempdb GO  IF OBJECT_ID('dbo.udf') IS NOT NULL     DROP FUNCTION dbo.udf GO  CREATE FUNCTION dbo.udf (@a INT) RETURNS VARCHAR(MAX) AS BEGIN     DECLARE @i INT = 1000     WHILE @i &gt; 0 SET @i -= 1      RETURN REPLICATE('A', @a) END GO  IF OBJECT_ID('tempdb.dbo.#temp') IS NOT NULL     DROP TABLE #temp GO  ;WITH     E1(N) AS (         SELECT * FROM (             VALUES                 (1),(1),(1),(1),(1),                 (1),(1),(1),(1),(1)         ) t(N)     ),     E2(N) AS (SELECT 1 FROM E1 a, E1 b),     E4(N) AS (SELECT 1 FROM E2 a, E2 b) SELECT * INTO #temp FROM E4 <\/code><\/pre>\n<p>  \u0418 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">SET STATISTICS TIME ON  SELECT SUM(LEN(dbo.udf(N))) FROM #temp <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"sql\">SQL Server Execution Times:    CPU time = 9109 ms, elapsed time = 11603 ms. <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 <i>SUM<\/i>, \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432 <i>ISNULL<\/i>:<\/p>\n<pre><code class=\"sql\">SELECT SUM(ISNULL(LEN(dbo.udf(N)), 0)) FROM #temp <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"sql\">SQL Server Execution Times:    CPU time = 4562 ms, elapsed time = 5719 ms. <\/code><\/pre>\n<p>  \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u0432 2 \u0440\u0430\u0437\u0430. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u043c\u0430\u0433\u0438\u044f\u2026 \u0410 <a href=\"https:\/\/connect.microsoft.com\/SQLServer\/feedback\/details\/636382\/scalar-expression-evaluated-twice-with-sum-aggregate\">\u0431\u0430\u0433 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 <\/a><i>SQL Server<\/i>-\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 <i>Microsoft<\/i> \u0443\u0436\u0435 \u00ab\u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a\u00bb \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 <i>SQL Server 2012 CTP<\/i>. <\/p>\n<p>  \u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c: \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <i>SUM<\/i> \u0438\u043b\u0438 <i>AVG<\/i> \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b, \u0435\u0441\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f <i>NULL<\/i>.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435\u2026 \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>  \u0412\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430 <i>Microsoft SQL Server 2012 (SP3) (KB3072779) \u2014 11.0.6020.0 (X64)<\/i>.<br \/>  \u041f\u043b\u0430\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0440\u0430\u043b \u0438\u0437 <a href=\"https:\/\/www.devart.com\/dbforge\/sql\/studio\/sql-query-profiler.html#header\"><i>dbForge Studio<\/i><\/a>.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/275069\/\"> http:\/\/habrahabr.ru\/post\/275069\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a80\/686\/6ba\/a806866bac4a4449bc615f9c45a7744f.png\" align=\"left\"\/>\u0415\u0441\u0442\u044c \u0442\u0440\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435: <i>COUNT<\/i>, <i>SUM<\/i> \u0438 <i>AVG<\/i>. \u0418 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u0434\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0443\u0436\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0430\u0441\u044c <a href=\"http:\/\/habrahabr.ru\/post\/271797\/\">\u0440\u0430\u043d\u0435\u0435<\/a>, \u0442\u043e \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043d\u044e\u0430\u043d\u0441\u044b. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443\u2026<\/p>\n<p>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u043f\u043b\u0430\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430, \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430: <i>Stream Aggregate<\/i> \u0438 <i>Hash Match<\/i>.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c <i>Stream Aggregate<\/i> \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430 \u043d\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<p>  \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, <i>Hash Match<\/i> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c (\u0437\u0430 \u0440\u0435\u0434\u043a\u0438\u043c <a href=\"http:\/\/sqlblog.com\/blogs\/paul_white\/archive\/2011\/12\/04\/is-distinct-aggregation-still-considered-harmful.aspx\">\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c<\/a>) \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b <i>Hash Match<\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u043a, <i>Hash Match<\/i> \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 <i>tempdb<\/i>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-272090","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=272090"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272090\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=272090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=272090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=272090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}