12.07.2015 Views

HÃ¥kan Winther - Microsoft

HÃ¥kan Winther - Microsoft

HÃ¥kan Winther - Microsoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Håkan <strong>Winther</strong>www.sqlservice.se


••••


www.sqlservice.se


www.sqlservice.se


•••••www.sqlservice.se


www.sqlservice.se


Feature Name Enterprise Business Intelligence Standard WebExpress withAdvanced ServicesMaximum Compute CapacityUsed by a Single Instance (SQLServer Database Engine)OS maxLimited to lesser of 4Sockets or 16 coresLimited to lesser of 4Sockets or 16 coresLimited to lesser of 4Sockets or 16 coresLimited to lesser of 1Socket or 4 coresMaximum Compute CapacityUsed by a Single Instance(Analysis Services, ReportingServices)OS maxOS maxLimited to lesser of 4Sockets or 16 coresLimited to lesser of 4Sockets or 16 coresLimited to lesser of 1Socket or 4 coresMaximum memory utilized(SQL Server Database Engine)OS max 64 GB 64 GB 64 GB 1 GBMaximum memory utilized(Analysis Services)OS max OS max 64 GB N/A N/AMaximum memory utilized(Reporting Services)Maximum relational DatabasesizeOS max OS max 64 GB 64 GB 4 GB524 TB 524 TB 524 TB 524 TB 10 GBwww.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


Paging functionality in SELECT• ORDER BY SomeFieldOFFSET ROWSFETCH NEXT ROWS ONLY;


Windowing function• OVER(PARTITION BY Column1,…ORDER BY Column2,…ROWS|RANGE BETWEEN UNBOUNDED PRECEDINGAND CURRENT ROW)


OVER Clause• ROWS identifies rows before and/or after current rowby rownumberROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROWROWS BETWEEN 1 FOLLOWING AND 4 FOLLOWINGROWS BETWEEN 3 PRECEDING AND UNBOUNDED FOLLOWING• RANGE identifies rows before and/or after current rowby column valuesRANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWINGRANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW• Default value: (Never use! Always spools to disk!)RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW


New analytic functionsFunction ORDER BY ROWS/RANGEFIRST_VALUE() Required OptionalLAST_VALUE() Required Optional (NOT!)LEAD() Required Not allowedLAG() Required Not allowedCUME_DIST() Required Not allowedPERCENT_RANK() Required Not allowedPERCENTILE_DISC() Not allowed Not allowedPERCENTILE_CONT() Not allowed Not allowed


New analytic functions• Value calculated from first/last record• FIRST_VALUE () OVER (…)• LAST_VALUE () OVER (…)• Value calculated from a specified previous/following row• LEAD (,,) OVER (…)• LAG (,,) OVER (…)• Cumulative distribution & relative rank• CUME_DIST () OVER (…)• PERCENT_RANK () OVER (…)• Percentile, discrete and continous• PERCENTILE_DISC () WITHIN GROUP(ORDER BY …) OVER (…)• PERCENTILE_CONT () WITHIN GROUP(ORDER BY …) OVER (…)


date and time functions• DATEFROMPARTS (y,m,d)• SMALLDATETIMEFROMPARTS (y,m,d,h.m)• DATETIMEFROMPARTS (y,m,d,h,m,s,ms)• DATETIME2FROMPARTS (y,m,d,h,m,s,fract,precision)• TIMEFROMPARTS (h,m,s,fract,precision)• DATETIMEOFFSETFROMPARTS (y,m,d,h,m,s,fract, h_off, m_off,precision)• EOMONTH (startdate, month_to_add)NOTE! Returns 00:00:00 as time…


functions• Conversion functions• PARSE ()• TRY_CONVERT ()• TRY_PARSE ()• String functions• CONCAT ()• FORMAT ()• Logical functions• IIF (), simplified case• Mathematical function• LOG()(enhancement)


• THROW•• No relation to sys.errormessages• Requires a semicolon before (previous statement has to beterminated by semicolon)•• THROW;• THROW 50001, ’Fel’, 11;• Same transaction issues as RAISERROR


www.sqlservice.se


sp_describe_first_result_setsp_describe_undeclared_parameterssys.dm_exec_describe_first_result_setsys.dm_exec_describe_first_result_set_for_object


Performance improvements


••••••••


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se


www.sqlservice.se).aspx


www.sqlservice.se


www.sqlservice.se

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!