#SQSummit
@pausempere
Cuando BI conoció a HekatonUna historia de amor
DPS – Business Intelligence
Clic para añadir certificacionClic para añadir certificacionClic para añadir certificacion
MAP 2012
Pau Sempere Sánchez
Objetivos
Revisar las técnicas que nos permiten trabajar con BI en escenarios de tiempo real o semi-real
Introducir nuevas tecnologías de Microsoft SQL Server 2014 en dichos escenarios
Agenda
Tiempo real en BI
Nuevas tecnologías en SQL Server 2014
Tiempo real en ETL – In-Memory ETL
Tiempo real en análisis de datos– Clustered Columnstore para el DWH
Agenda
Tiempo real en BI
Nuevas tecnologías en SQL Server 2014
Tiempo real en ETL – In-Memory ETL
Tiempo real en análisis de datos– Clustered Columnstore para el DWH
Adaptando la actualización de datos
DB DW Cubo
Modelado simple
Optimización de consultas
Latencia T. Consulta
UsuarioNuevos Datos
Datos Disponibl
es
Datos Disponibl
es
Staging
Optimización de Staging
Agenda
Tiempo real en BI
Nuevas tecnologías en SQL Server 2014
Tiempo real en ETL – In-Memory ETL
Tiempo real en análisis de datos– Clustered Columnstore para el DWH
Novedades en SQL Server 2014
Nuevo motor In-Memory OLTP (a.k.a. Hekaton)– Tablas en memoria• SCHEMA_ONLY • SCHEMA_AND_DATA
– Nuevas estructuras de datos latch-free– Procedimientos almacenados compilados
Índices columnares clústered
Nuevas tecnologías SQL Server 2014
Sin accesos a
disco
Tablas In-Memory SCHEMA_ONLY
Sin logging
Sin bloqueos
Sin checkpoin
ts
Tipos de índices propios
Cumplen ACI
Nuevas tecnologías SQL Server 2014
Tablas In-Memory
Collations
Memoria disponible
Número de índices
Tipos de datos
Nuevas tecnologías SQL Server 2014
ClusteredCompletamen
te actualizables
Aún mejor compresión
Clustered Columnstore Indexes
Agenda
Tiempo real en BI
Nuevas tecnologías en SQL Server 2014
Tiempo real en ETL – In-Memory ETL
Tiempo real en análisis de datos– Clustered Columnstore para el DWH
Tiempo real en ETL
Reducción de la latencia
Entrada / Salida (IO)Eliminar bloqueos
Datos carga ETLStaging
SCHEMA_ONLY Data
WareHouse
Transformaciones nativamente compiladas
20
DEMOIn-Memory ETL
Optimizando Staging
Transformaciones ETL
optimizadasIO mejorada
Ausencia de bloqueos
Agenda
Tiempo real en BI
Nuevas tecnologías en SQL Server 2014
Tiempo real en ETL – In-Memory ETL
Tiempo real en análisis de datos– Clustered Columnstore para el DWH
Clustered Columnstore Index
C1 C2 C3 C5 C6C4
Segment
Row Group
Clustered Columnstore Index
OrderDateKey
ProductKey
StoreKey
RegionKey
Quantity
SalesAmount
20101107 106 01 1 6 30.00
20101107 103 04 2 1 17.00
20101107 109 04 2 2 20.00
20101107 103 03 2 1 17.00
20101107 106 05 3 4 20.00
20101108 106 02 1 5 25.00
20101108 102 02 1 1 14.00
20101108 106 03 2 5 25.00
20101108 109 01 1 1 10.00
20101109 106 04 2 4 20.00
20101109 106 04 2 5 25.00
20101109 103 01 1 1 17.0024
Particionamiento Horizontal (Row Groups)
OrderDateKey
ProductKey
StoreKey
RegionKey
Quantity
SalesAmount
20101107 106 01 1 6 30.00
20101107 103 04 2 1 17.00
20101107 109 04 2 2 20.00
20101107 103 03 2 1 17.00
20101107 106 05 3 4 20.00
20101108 106 02 1 5 25.00
OrderDateKey
ProductKey
StoreKey
RegionKey
Quantity
SalesAmount
20101108 102 02 1 1 14.00
20101108 106 03 2 5 25.00
20101108 109 01 1 1 10.00
20101109 106 04 2 4 20.00
20101109 106 04 2 5 25.00
20101109 103 01 1 1 17.0025
Particionamiento Vertical (Segmentos)OrderDateKey
20101107
20101107
20101107
20101107
20101107
20101108
ProductKey
106
103
109
103
106
106
StoreKey
01
04
04
03
05
02
RegionKey
1
2
2
2
3
1
Quantity
6
1
2
1
4
5
SalesAmount
30.00
17.00
20.00
17.00
20.00
25.00OrderDateKey
20101108
20101108
20101108
20101109
20101109
20101109
ProductKey
102
106
109
106
106
103
StoreKey
02
03
01
04
04
01
RegionKey
1
2
1
2
2
1
Quantity
1
5
1
4
5
1
SalesAmount
14.00
25.00
10.00
20.00
25.00
17.00 26
Compresión
OrderDateKey
20101107
20101108
ProductKey
106
103
109
StoreKey
01
04
03
05
02
RegionKey
1
2
Quantity
6
1
2
4
5
SalesAmount
30.00
17.00
20.00
25.00
OrderDateKey
20101108
20101109
ProductKey
102
106
109
103
StoreKey
02
03
01
04
RegionKey
1
2
Quantity
1
5
4
SalesAmount
14.00
25.00
10.00
20.00
25.00
17.00
27
La ley del mínimo esfuerzoSELECT ProductKey, SUM (SalesAmount) FROM SalesTable WHERE OrderDateKey < 20101108GROUP BY ProductKey
StoreKey
01
04
03
05
02
StoreKey
02
03
01
04
RegionKey
1
2
3
RegionKey
1
2
Quantity
6
1
2
4
5
Quantity
1
5
4
OrderDateKey
20101107
20101108
OrderDateKey
20101108
20101109
ProductKey
106
103
109
ProductKey
102
106
109
103
SalesAmount
30.00
17.00
20.00
25.00
SalesAmount
14.00
25.00
10.00
20.00
25.00
17.00
28
Optimizando la entrada al DWH
Optimizando la entrada al DWH
Tuple MoverDe Delta Store a Row Groups
– 100k filas (BULK INSERT) / 1M filas (INSERT)– 5 minutos– ALTER INDEX … REORGANIZE
Optimizando la entrada al DWH
Row Groups102.400 – 1.048.576 filas
Filas (BULK Load) Filas al Columnstore Filas en el Delta Store
102.000 0 102.000145.000 145.000 (RowGroup de 145000) 0
1.048.577 1.048.576 (RowGroup de 1.048.576) 1
2.522.152 2.252.152 2 x 1.048.576 + 1 x 155.000
0
32
DEMOOptimizando el DWH
Conclusiones
ETL Tablas InMemory SCHEMA_ONLYTransformaciones compiladas
DWHClustered Columnstore IndexAdaptar la inserción a las necesidades de consulta
34
Power BI para usuarios de negocio
34
Curso onlineClases virtuales presenciales14, 15, 16, 21, 22 y 23 de JulioDe 16 a 20 h
Máster en BI 4ª Edición (Inicio Octubre 2014)- Clases presenciales virtuales- 450 horas (60 ECTS) - SolidQ – UPM
- Clases + trabajo práctico + proyecto- Beca de hasta 1.300 € para los primeros inscritos.
Máster en Big Data & Analytics1ª Edición (Inicio Octubre 2014)- Clases presenciales virtuales- 1 año (60 ECTS) UMA
- Clases + trabajo práctico + proyecto
Información e inscripción: http://university.solidq.com / [email protected]
Si quieres disfrutar de las mejores sesiones de nuestros mentores de España y Latino América, ésta es tu
oportunidad.
http://summit.solidq.com
Síguenos:
35
DPS – Business Intelligence