Time normalization: a SQL CLR approach to address unevenly-spaced data samples

One very common challenge in the IT department is to represent time driven data. Think about performance counter values, weather data or, more simply, your own weight tracking. This kind of data is taken in samples: each sample is defined by the collection time. When we try to visualize the data, we often need to…

0

Streaming in SQL Server using SQL CLR

The SQL Server engine execution operators are of two kinds: blocking and non-blocking. Blocking operators need to consume the complete dataset before returning an output. Think about the COUNT(*) operator: in order to tell you the result it has to go over all your rows. Another example of blocking operator is the Sort operator. Proper…

5

SQLSaturday 264 slide deck

Hi all, here are the slides of our recent speech at SQLSaturday 264 in Ancona (http://www.sqlsaturday.com/264/eventhome.aspx). You will also find the demo scripts. Feel free to share your thoughts. Happy Coding, Francesco Cogno (@MindFlavor) and Giuseppe Zagarrio (@ZagaMimmo) [View:~/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-37/6-degrees-of-separation.pdf:550:0] [View:~/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-37/6254.Demos.zip:550:0]

0

SQLCLR: string or SqlString?

One of the most asked question regarding the SQL CRL is whether to use string instead of System.Data.SqlString (see [MSDN] SqlString Structure for further details). You might guess that, from a performance point of view, using string is better. Let’s confirm (or reject) this assumption. First we need to create two very simple SQLCLR functions:…

1

SQL CLR Functions and parallelelism

If you develop your own SQLCLR functions, you know you should decorate the method with this attribute class: [MSDN] SqlFunctionAttribute Class. You might wonder what these options will do. The DataAccess Property, according to the documentation, “Indicates whether the function involves access to user data stored in the local instance of SQL Server”.  You might be…

2

Sneak peek on SQL 2014: Parallel SELECT … INTO!

We are all exited about SQL 2014. I’m sure you have already downloaded the CTP. In this short post I would like to show you a welcome feature that you might not know about :). Suppose to have a large, parallel query. Until now if you wanted to create a table out of that query…

2

Selective XML Indexes

Con il Service Pack 1 di SQL Server 2012 è stata aggiunta una funzionalità molto utile a chi utilizza il tipo nativo di SQL Server dedicato ai documenti XML: gli indici XML selettivi. Questi indici selettivi permettono di specificare quali elementi (o, meglio, percorsi) da indicizzare in contrasto col l’indice primario XML che indicizza tutto…

0

SQL 2012 e VLFs

Un post veloce per mostrare una funzionalità molto gradita introdotta da SQL Server 2012. Come sicuramente saprete, troppi VLF (virtual log files) possono impattare negativamente le operazioni del transaction log. Fino SQL Server 2008 R2 bisognava attivamente documentarsi per avere informazioni sul numero di VLF (ad esempio con DBCC LOGINFO). SQL Server 2012, invece, mostra…

0

TDS and Network packet size

Vi siete mai chiesti qual’e’ l’overhead del protocollo TDS? Il protocollo e’ ben documentato a questo indirizzo: http://msdn.microsoft.com/en-us/library/dd304523(v=PROT.13).aspx, tuttavia in questo post seguiremo un approccio differente da quello accademico: snifferemo i pacchetti (TCP) fra Management Studio e SQL Server per analizzarli ex-post. In questo modo avremo un pretesto per analizzare il comportamento del protocollo TDS….

0

Cambiamento epocale nella gestione delle statistiche

Salve a tutti, L’argomento di oggi ha, per chi lavora con SQL Server da molti anni, un significato particolare perché va ad impattare uno degli aspetti più granitici ed immutabili nel tempo, sai che è così da (n) versioni e (m) anni, con tutti i problemi del caso, ed un bel giorno Ti svegli ed…

0