Performance Tuning / SQL Server DBA / sqlLAB

SQL Query Tuning: Non-SARGable Conditions & Optimising Joins

Recently I got the chance to do some query tuning for a client. The client had contacted us because their users were experiencing particularly slow performance running reports from their BI Dashboard. Their internal teams thoroughly reviewed their network and SSRS packages and couldn’t find anything untoward. When they dug deeper into one particularly slow … Continue reading

Data Analysis

Sorting Data in R

Experimental RLab #2 Sorting data is one of the fundamental techniques of any data analysis. In R, sorting is all done in-memory with a variety of functions (e.g. sort, order). SQL -like queries are also possible through the `sqldf` library. The official CRAN package site for sqldf is: Google Code Page: Google Group … Continue reading

Data Analysis

Aggregating Data in R

Like any multi-paradigm language, there are a number of options for looping in R. R’s declarative constructs provide a convenient mechanism for aggregating data. This Experimental-RLab aggregates the data before calculating the correlation between two variables. In SQL, this would look like: Method 1: Imperative Loops Things I like about the imperative approach: it is … Continue reading