Upload
mindfire-solutions
View
769
Download
2
Embed Size (px)
DESCRIPTION
One of the most important factors to be successful as a developer is being up to date in knowledge and unlearning old outdated stuff and learning new stuff. This is very essential whenever there is a new release of a product that we are working in. Here is an attempt to learn together the new features of SQL 2012.
Citation preview
Agenda
- Shortcuts - New DMVs - Spatial Indexes - Columstore Indexes - String Functions - DateTime Functions - Conversion Functions - Offset and Fetch - Sequence - With Result Sets - Error Handling Enhancements - Filetable - Analytical Functions - Questions posed by Big Data
Shortcuts
Keyboard ShortcutsQuery ShortcutsFormatting ShortcutsAuto Recover (Old)Visual Studio CompatibleFull List
New DMVs
Server state information that can be used to monitor the health of a server instance, diagnose problems, and tune performance.
Multiple Types (DB, Extended Events, Execution, Mirroring, CLR, Index, I/O, Security, Etc.)
New Additions in 2012Select *
Spatial Indexes
Faster build time for spatial indexes on point data – critical for tables with millions of rows
Optimized STDistance and STBuffer FunctionsRow Compression and Page Compressionsp_help_spatial_geography_histogram
sp_help_spatial_geometry_histogramMore Details
Columnstore Indexes
Star Schema - Fact table – Dimension TableRow Based StorageColumnstore Indexes – Performance
ImprovementSyntaxRestrictions – Insert/UpdateData type restrictionsClustered Columnstore Index?
String Functions
CONCAT◦Auto Handles NULL
FORMAT◦Addresses Issues in DateTime Formatting ◦Culture specific same as in .NET ◦FORMAT ( value, format [, culture ] )
DATETIME Functions
EOMONTHDATEFROMPARTS
◦Sample, Format DateDATETIME2FROMPARTSTIMEFROMPARTSDATETIMEFROMPARTSDATETIMEOFFSETFROMPARTS
Conversion Functions
TRY_PARSEPARSETRY_CONVERT
Logical Functions
IIFCHOOSE
Offset and Fetch
Are You Paginating Right?
SEQUENCE
IdentitySEQUENCE - at DB level - used across
multiple tables – Controlled by AppSEQUENCE can be reset without altering
its previous value – MIN – MAX - CYCLE
SEQUENCE USAGE - MSDN
The application requires a number before the insert into the table is made. The application requires sharing a single series of numbers between multiple
tables or multiple columns within a table. The application must restart the number series when a specified number is
reached. For example, after assigning values 1 through 10, the application starts assigning values 1 through 10 again.
The application requires sequence values to be sorted by another field. The NEXT VALUE FOR function can apply the OVER clause to the function call. The OVER clause guarantees that the values returned are generated in the order of the OVER clause's ORDER BY clause.
An application requires multiple numbers to be assigned at the same time. For example, an application needs to reserve five sequential numbers. Requesting identity values could result in gaps in the series if other processes were simultaneously issued numbers. Calling sp_sequence_get_range can retrieve several numbers in the sequence at once.
You need to change the specification of the sequence, such as the increment value.
WITH RESULT SETS
change the column names and data typesof the result set returned in the execution of a SP
Error Handling With Throw
Much Easier, SimplerSimilar to .NETNo need of @@RAISE_ERROR Anymore
Filetable
Filetable in SQL 2012http://www.ourgoalplan.com/KLMS/TipView
.aspx?id=3241
Analytical Functions
FIRST_VALUELAST_VALUELAGLEAD
Questions Posed by BigData
Velocity Volume Variability Hadoop - DFSFacebook Twitter GoogleTwo different reasonsSSD – Solid State Data Storage allows
100,000s IOPS Vs 150 to 200Hortonworks and Cloudera