top of page

Demarco: from a database in critical condition to smaller machines, and now on to Analytics

Writer: Dataside
Dataside
4 days ago
4 min read

Demarco has been in business for more than 20 years. It started as a consultancy and, as it specialized, began developing software to support that work. Today technology is its flagship: the company offers people management, fleet safety management and third-party management systems as a service to large contracting companies, plus a corporate training platform. It is a business that depends on a fast, stable database. About two years ago, when that database became a problem, Demarco called Dataside.


The challenge

Demarco was living with severe slowness in the database behind its systems. The environment runs on SQL Server in a virtual machine on Azure, and the heaviest database serves Bancodoc, now the company's largest system.


The impact showed up everywhere: screens freezing, reports that wouldn't generate and critical routines failing. At times the server's CPU hit 100% and stayed saturated for long stretches. In a seven-day analysis, business hours averaged between 80% and 95% usage. For Demarco's customers, that turned into complaints.


The problem also spilled over into operations. Demarco has a team that validates documents within an SLA agreed with customers. With the database slow, validation stalled, and the workaround was to have people review documents at off-peak hours, when the server was less loaded, and pay overtime to stay within the deadline.

"Dataside helped us at a really critical moment. We badly needed optimizations; we had a serious slowness problem in the database." — Orlando Junior, IT Director at Demarco

The first contact came through a Dataside piece that reached Demarco's president and was passed on to the IT team. The partnership was signed soon after the first conversations. Demarco didn't know Dataside before, and what tipped the decision was confidence in the quality of the service and the people.


The solution

Dataside took over database support and went after the root cause. In every analysis of slowness and CPU usage, the same offender showed up: the ASO routine. Its query used generic filters that handled, in a single statement, runs filtered by company or employee and runs with no filter at all. As a result, SQL Server reused a single execution plan for very different scenarios, and the plan regressed, especially after statistics updates, cache clears or restarts. The bad plan requested too much memory, created wait queues and drove CPU up.


During critical episodes, Dataside stabilized the environment by clearing cached plans, recompiling procedures, forcing and unforcing plans, creating indexes and killing the offending sessions. At the same time, it proposed rewriting the most critical part of ASO. In the rewritten version, the query ran about 76% faster, used 85% less CPU and read 99% less data.


That result showed how big the problem was and grounded the permanent fix. Since the fix depended on the application's business rules, Demarco's team refactored the routine so reports would use consolidated data. In parallel, Dataside optimized other procedures that weighed on CPU usage. In one of them, already in production, execution time dropped about 60%, with half the CPU usage and less than half the reads.


The split of roles was clear. Dataside handled root-cause analysis, rewrite proposals, stabilization actions and targeted optimizations. Demarco handled the ASO refactoring, testing and deploying the changes to production.

"The big goal was to think about reducing and optimizing the database, not just solving problems. And we're already getting there. We've already been able to downsize the machine, and the outlook is to reduce further in the short term." — Orlando Junior

Less machine, same environment

With CPU usage under control, Dataside ran a sizing study based on real usage metrics, including validation with CPU limits, patching and consultation with Microsoft. The virtual machine was downsized and now runs with 37.5% fewer vCPUs. Because SQL Server licensing is charged per vCPU, the license bill fell by the same proportion.


There was room on memory too, since the machine had twice what SQL Server Standard edition can use for data. The next step, planned for when the current reservation expires, is to move to a newer machine family with 37.5% less memory and local disk for TempDB. The estimate is to cut the server's monthly cost by about 32%. Meanwhile, the team keeps fine-tuning the most CPU-intensive queries to lock in the reduction.


Day to day, what stood out to the client was the team's level and how fast it responds.

"We don't see a difference between leadership and the person doing day-to-day support; everyone is highly skilled. And anything we ask for, even when it can't be done, the answer comes back very quickly, with a well-grounded analysis, the impact of each action and suggestions for improvement." — Orlando Junior

From database support to Analytics

In its database results reviews, Dataside sets aside time to talk about its other services. In one of them, Demarco's team said it had stalled on building a data lake and had no budget set aside for it. With the database environment stable, Dataside reallocated a third of the contract hours to start helping on that front.


The Analytics Support team's initial assessment produced a map of what Demarco could improve and which problems could be tackled faster. That diagnosis led to the expansion: Demarco signed a new Analytics Support contract, and the kick-off took place in October 2026.

"The amount of information was really rich, and that's what made us expand the contract to cover analytics as well." — Orlando Junior

Results

On the database side, Demarco went from an environment that hit 100% CPU during business hours to a stable one, with the main offending routine fixed based on Dataside's diagnosis. Stability opened room to cut costs: the machine already runs with 37.5% fewer licensed vCPUs, and the planned switch should cut the server's monthly cost by about 32%. On the data side, the initial diagnosis was enough for the client to expand the partnership, and Dataside now works on two of Demarco's business fronts.

"Dataside's work with us is a major differentiator for us. It brought enormous growth and improvement to our service. We went from a very critical level of problems to reaping the rewards of cost reductions and optimizations today." — Orlando Junior

In a phrase, Orlando sums up what Dataside represents today: "a successful partnership." Watch the full testimonial (in Portuguese):



 
 
 

Comments


bottom of page