Pull to refresh
18.9

Microsoft SQL Server *

Relational database management system developed by Microsoft

Show first
Rating limit
Level of difficulty

Evaluating Performance: CosmosDB vs. Azure SQL

Level of difficulty Easy
Reading time 4 min
Views 4.9K

In the evolving landscape of database technology, choosing the right database management system is crucial for the efficiency and scalability of applications. This article presents a detailed comparison of the performance between Microsoft's CosmosDB and MS SQL Server. We'll examine how each database performs under various load conditions and share some interesting findings.

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

MSSQL: Table Rebuild and Reorg in highload 24/7 Environments

Level of difficulty Medium
Reading time 14 min
Views 1.7K

How do you deal with index fragmentation if your SQL server is working in high load environment with 24/7 workload without any maintenance window? What are the best practices for index rebuild and index reorganize? What is better? What is possible if you have only Standard Edition on some servers? But first, let's debunk few myths.

Myth 1. We use SSD (or super duper storage), so we should not care about the fragmentation. False. Index rebuild compactifies a table, with compression it makes it sometimes several times smaller, improving the cache hits ratio and overall performance (this happens even without compression).

Myth 2. Index rebuild shorten SSD lifespan. False. One extra write cycle is nothing for the modern SSDs. If your tempdb is on SSD/NVMe, it is under much harder stress than data disks.

Myth 3. On Enterprise Edition there is a good option: ONLINE=ON, so I just create a script with all tables and go ahead. False. There are tons of potential problems created by INDEX REBUILD even with ONLINE and RESUMABLE ON - so never run index rebuilds without controlling the process.

Finally, we will tackle the REBUILD vs REORGANIZE subject and what is possible to achieve if you have only Standard Edition.

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

Critical Transcendence: .NET SDK and Apache Spark

Reading time 5 min
Views 785

When Alex Garland’s series Devs (on FX and Hulu) came out this year, it gave developers their own sexy Hollywood workup. Who knew that coders could get snarled into murder plots and love triangles just for designing machine learning programs? Or that their software would cause a philosophical crisis? Sure, the average day of a developer is more code writing than murder but what a thrill to author powerful new program.


Read more →
Rating 0
Comments 0

How to receive data from Google Analytics using R in Microsoft SQL Server

Reading time 9 min
Views 3.1K

In this article I want to show in detail how you can use R in Microsoft SQL Server to get data from Google Analytics (and generally from any API).


The task — we have MS SQL server and we want to receive data in DWH by API


We will use googleAnalyticsR package to connect to Google Analytics (GA).


This package is chosen as an example due to its popularity. You can use another package, for example: RGoogleAnalytic.
Approaches to problem solving will be the same.

Read more →
Total votes 9: ↑8 and ↓1 +7
Comments 1

Testing SQL Server code with tSQLt

Reading time 20 min
Views 2.3K
FYI: this article is an expanded version of my talk at SQA Days #25.

Based on my experience with colleagues, I can state: DB code testing is not a widely spread practice. This can be potentially dangerous. DB logic is written by human beings just like all other «usual» code. So, there can be failures which can cause negative consequences for a product, business or users. Whether these are stored procedures helping backend or it is ETL modifying data in a warehouse — there is always a risk and testing helps to decrease it. I want to tell you what tSQLt is and how it helps us to test DB code.

Read more →
Total votes 8: ↑7 and ↓1 +6
Comments 1

SQL Index Manager – a long story about SQL Server, grave digging and index maintenance

Reading time 14 min
Views 2.7K
Every now and then we create our own problems with our own hands… with our vision of the world… with our inaction… with our laziness… and with our fears. As a result, it seems to become very convenient to swim in the public flow of sewage patterns… because it is warm and fun, and the rest does not matter – we can smell round. But after a fail comes the realization of the simple truth – instead of generating an endless stream of causes, self-pity and self-justification, it is enough just to do what you consider the most important for yourself. This will be the starting point for your new reality.

For me, the written below is just such a starting point. The way is expected to be lingering…
Let's go?
Total votes 17: ↑16 and ↓1 +15
Comments 0

Selecting, caching and displaying photos on the map

Reading time 13 min
Views 1.4K

In this article, I decided to describe how the functionality of selecting and displaying photos on a specific place on the map was implemented in our photo service gfranq.com. The photo service does not work now.



Since we had a lot of photos in our service and sending requests to database every time the viewport changes was too resource-intensive, it was logical to divide the map into several areas that contain information about the retrieved data. For obvious reasons, these areas have rectangular shape (although hexagonal grid was considered too). As the areas become more spherical at large scales, elements of spherical geometry and tools for it were also considered.


In this article, the following issues were raised:


  • Storing and retrieving photos from the database and caching them on the server (SQL, C#, ASP.NET).
  • Downloading necessary photos on the client side and saving them to the client cache (JavaScript).
  • Recalculation of photos that must be hidden or shown when the viewport changes.
  • Elements of spherical geometry.
Read more →
Total votes 15: ↑14 and ↓1 +13
Comments 0

Monitoring System for Windows servers on pure SQL, and how I had secretly dragged it into the Production

Reading time 5 min
Views 1.3K
A long time ago in a galaxy far, far away there was a company grown from a startup to something much bigger, but for a while the IT department was still compact and very efficient. That company hosted on prem hundreds of virtual Windows servers, and of course these servers were monitored. Even before I joined the company, NetIQ had been chosen as a monitoring solution.

One of my new tasks was to support NetIQ. The person, who worked with NetIQ before, said a lot about his experience with NetIQ, unfortunately, if I try to put it here it would be just a long line of ‘****’ characters. Soon I realized why. Steve Jobs is probably spinning in his grave looking at the interface like this:

image
Read more →
Total votes 22: ↑21 and ↓1 +20
Comments 0

Authors' contribution