#JSS2013
Les journéesSQL Server 2013
Un événement organisé par GUSS
#JSS2013
Les journéesSQL Server 2013
Un événement organisé par GUSS
SSAS ROLAP sur Column StoreCharles-Henri SaugetPatrice Harel
#JSS2013
Merci à nos sponsors
3
#JSS20134
#JSS20135
#JSS2013
• Objectifs• Implémentation technique• Fonctionnement du CSI• Intérêts du ROLAP• Comparaison des performances• Les limites• Ressources
SOMMAIRE
6
#JSS2013
OBJECTIFS IMPLEMENTATION TECHNIQUE FONCTIONNEMENT DU CSI INTERETS DU ROLAP
• Profiter des avancées sur le CSI• Etudier les performances d’une base
ROLAP sur du CSI• Les comparer avec du MOLAP et du
TABULAR
7
#JSS2013
IMPLEMENTATION TECHNIQUE FONCTIONNEMENT DU CSI INTERET
• RAM : 25 Go; CPU : 4 cores, 8 threads; SSD
• Datawarehouse Wikipedia : – 120 Go– 250 Millions de lignes dans la principale table de
fait
8
#JSS2013
Entrepôt de données
FactRevisionPage
DimUser
FactPageDimRevision
DimDate
DimCategory
DimPage
9
#JSS2013
FONCTIONNEMENT DU CSI INTERETS DU ROLAP COMPARAISON
S1
Dictionnaire principal
Partition 1
Partition 2
C1 C2
S3
S2
C3
S2
Exemple d’encodage
Delta store
S1
S3
S2
S2
S1
S3
S2
S2
Dictionnaires
secondaires
DIRECTORY
L1 L1 L1L2 L2 L2L3 L3 L3… … …
N° Cmd
Nom Produit
SO1510 VéloSO1510 FourcheSO6589 VéloSO1574 VéloSO5985 VéloSO5985 GuidonSO5985 VéloSO5985 FourcheSO5989 FourcheSO5648 Fourche
Encode
Nom Produit
1 Vélo2 Fourche3 Guidon
Encode
Redondance
1 12 11 33 11 12 3
N° Cmd
Nom Produit
SO1510 VéloSO6589 VéloSO1574 VéloSO5985 VéloSO5985 VéloSO5985 FourcheSO5989 FourcheSO5648 FourcheSO1510 FourcheSO5985 Guidon
Encode
Redondance
1 52 43 1
10
#JSS2013
• Clustered CSI lecture/écriture• BLOB• Segment elimination• Batch mode• Compression “Archive”
Point importants
11
#JSS2013
La mise à jour des données
DEL
ETED
RO
WS
Bitm
ap o
u B-
tree
Delta store
Encodage et compression
Tuple mover
Nouveaux segmentsINSERTDELETE
• INSERT : dans le Delta Store
• DELETE : dans le Delta Store ou dans le Deleted Rows store
12
#JSS2013
demoFONCTIONNEMENT DU CSI
13
#JSS2013
INTERETS DU ROLAP COMPARAISON DES PERFORMANCES LES LIMITES
• Peu (pas) de temps de processing• “Temps réel”• Partitionnement côté SQL
14
#JSS2013
Optimisation du ROLAP• Types de données• Statistiques• Spill• Hint• M2MQuery • CSI : fragmentation due au
partitionnement15
#JSS2013
Optimisation du ROLAP• Types de données
Jointure INT – INT24s
Jointure NUMERIC- INT34s
16
#JSS2013
Optimisation du ROLAP• Spill
SELECT COUNT(*) FROM [dbo].[FactPageRevision] WTINNER JOIN [dbo].[DimRevision] DRON WT.[RevisionId]=DR.RevisionIdWHERE RevisionDateId > 20130101
17
#JSS2013
Optimisation du ROLAP• StatistiqueSQL Server ne connaît pas le lien entre nos colonnesCREATE STATISTICS ClientInteressantON DimClient( [CA], [NbConsultant], [Utilise SQL])WHERE [CA] > 5000000AND [Utilise SQL] = 'Oui'
18
#JSS2013
demoQUERY HINT
19
#JSS2013
Entrepôt de données
FactRevisionPage
DimUser
FactPageDimRevision
DimDate
DimCategory
DimPage
20
#JSS2013
Many-to-manyPageI
dCategoryI
d1 541 591 642 262 323 543 593 64
CategoryList
MatrixId
54, 59, 64 126, 32 2
PageId MatrixId1 12 23 1
21
#JSS2013
Many-to-many
FactRevisionPage
DimUser
FactCategoryMatrixDimRevision
DimPage
DimCategory
DimDate
DimCategoryMatrix
22
#JSS2013
COMPARAISON DES PERFORMANCES RESSOURCES LES LIMITES
SELECT [Measures].[Revision Count] ON 0,NON EMPTY [Date].[Year].[Year] ON 1FROM [Wikipedia]
Requête 1
SELECT [Measures].[Revision Count] ON 0,NON EMPTY [Category].[Category].[Category] ON 1FROM [Wikipedia]
Requête 2
SELECT [Measures].[Fact Page Revision Count] ON 0,NON EMPTY [Date].[Month].[Month]*[User].[User].[User] ON 1FROM [Wikipedia]WHERE [Date].[Year].&[2013]
Requête 3
23
#JSS2013
COMPARAISON DES PERFORMANCES RESSOURCES LES LIMITES
Requête 1
Requête 2
Requête 3
ROLAP - CSI 1 141 26 516*
102 625 20 578
MOLAP 2 864 33 175* 22 547
TABULAR 5 219 52 983 19 891
Données en milliseconde, sur cache froid* M2M factorisée
Requête 2
2651633175
52983
Requête 3
20578
21547
19891
Requête 1
1141
2864
5219
24
#JSS2013
LES LIMITES RESSOURCES
• CSI : quelques types de données incompatibles (varchar(MAX), text, xml, …)
• CSI non-clustered seulement en lecture• CSI clustered doit être l’unique index de
la table• Alignement du partitionnement table-
index25
#JSS2013
RESSOURCEShttp://technet.microsoft.com/en-us/library/gg492088(v=sql.120).aspxhttp://rusanu.com/2012/05/29/inside-the-sql-server-2012-columnstore-indexes/http://social.technet.microsoft.com/wiki/contents/articles/3540.sql-server-columnstore-index-faq.aspxhttp://rusanu.com/2011/07/13/how-to-use-columnstore-indexes-in-sql-server/http://social.technet.microsoft.com/wiki/contents/articles/4995.sql-server-columnstore-performance-tuning.aspxhttp://downloads.sqlity.net/ColumnstoreIndexInternals.pdfhttp://sqlblog.com/blogs/alberto_ferrari/archive/2012/08/17/new-whitepaper-from-sqlbi-vertipaq-vs-columnstore.aspxhttp://www.sqlskills.com/blogs/joe/row-and-batch-execution-modes-and-columnstore-indexes/http://www.nikoport.com/2013/07/05/clustered-columnstore-indexes-part-1-intro/
SSAS 2008 Unleashed, SAMSExpert Cube Development, Webb-Russo-Ferrari26
#JSS2013#JSS2013
Top Related