Leapwork Database Health & Maintenance Recommendations
Leapwork Database Health & Maintenance Recommendations
We understand that performance issues can significantly impact your teams and business workflows. This guide is meant to support you with actionable steps while also highlighting how Leapwork is here to help in partnership. These recommendations are based on real-world observations across multiple customers and are continuously refined to help you get the best from your Leapwork investment.
Leapwork relies on Microsoft SQL Server for backend data storage. As an on-premise platform, database performance is influenced significantly by your internal infrastructure and maintenance routines. This document outlines recommended practices to ensure long-term performance, stability, and resilience of the Leapwork platform.
Top Things to Check Now if You Are Facing Slowness
- Fragmentation above 50% ? -> Run index rebuild
- Large Audit/Version tables ? -> Run cleanup script
- CPU >70% consistently ? -> Check tier suitability and consider scale-up
- Long-Running Queries ? -> Fetch queries with the highest duration and execution count using DMVs (sys.dm_exec_query_stats) and send to support
- Isolate Application from Background Loads (If Possible) Run heavy imports or reports in off-peak hours
- Unsure what to do ? -> Contact Leapwork support, we'll help prioritize actions
Recommended Database Maintenance Activities
| Category | Recommendation |
|---|---|
| DBA Ownership | - Assign a dedicated DBA responsible for maintaining the Leapwork database. - Ensure availability during escalations. |
| Transaction Log Management | - Use DBCC SHRINKFILE only when necessary (e.g., after a large delete or cleanup).- Avoid frequent shrinking as it causes fragmentation. |
| Index Management | - Rebuild indexes monthly and after any import/export activity to reduce fragmentation - Monitor index fragmentation; - Trigger rebuild when >50% - Analyze workloads using Database Tuning Advisor to identify missing indexes and reduce table scans in large databases |
| Data Archival | - Archive or purge audit log and version history tables every 6 months |
| Statistics Updates | - Enable auto-update of statistics - Manually update after large data imports or batch changes |
| Backup Strategy | - Schedule full daily backups - Test restoration quarterly |
| SQL Server | - Ensure SQL Server is patched and supported |
| Monitoring & Alerts | - Set up alerts for CPU, tempdb growth, I/O latency, and long-running queries |
| Access Controls | - Use least-privilege principle - Avoid shared SA accounts |
| Identify and Optimize Long-Running Queries | - Use built-in SQL Profiler or Extended Events - Collect execution plans for performance analysis - If needed, our support and engineering team can walk you through interpreting execution plans and jointly decide next steps for optimization. |
Database Monitoring Recommendation:
Every environment has a unique concurrency need and usage pattern, which may lead to CPU or memory spikes, especially during peak automation executions or high test result loads.
To ensure optimal performance and proactively detect degradation:
- Monitor the Top 30 resource-intensive queries in your database (based on CPU, I/O, and execution time).
- Share these with Leapwork Support for performance tuning or indexing recommendations.
- If your monitoring shows sustained CPU utilization above 70%, we strongly recommend:
- Upgrading your SQL instance to a higher tier (more CPU/RAM)
These practices not only prevent run-time issues such as timeouts and database locks, but also improve overall system responsiveness, particularly under load.
Failure to scale appropriately under high load may result in degraded functionality, increased timeouts, and reduced system responsiveness.
Without appropriate infrastructure, Leapwork Support’s ability to resolve performance issues may be limited, as root causes could lie outside application logic.
Enabling Advanced Diagnostics for Proactive Monitoring
Amazon RDS (SQL Server)
- Enable Performance Insights (Advanced Mode) to track top queries, wait events, and CPU load over time.
Azure SQL (MI or SQL DB)
- Use Query Store and Intelligent Insights to monitor query regressions, plan changes, and tempdb contention.
On-Premise SQL Server
- Use Query Store (SQL Server 2016+) and Extended Events for query diagnostics
- Use
sp_whoisactivefor real-time session analysis
These tools help shorten RCA cycles and improve tuning accuracy. Share exports with Leapwork for support engagement.
Common Issues We Encounter
Over time, we’ve identified recurring database challenges that can impact platform performance, especially in high-concurrency environments:
- Underpowered Database Configuration: As automation usage grows, system load increases. We often observe that database specifications (CPU, RAM, IOPS) remain static, leading to performance degradation under load.
- Index Fragmentation >80%: This leads to severe slowdowns, especially in reporting and execution-heavy workflows.
- Data Bloat: Retained logs and result history can push database size beyond 100GB, affecting backup/restore times and query performance.
- Lack of DBA Availability: During incidents, delays occur when internal DBA support is not readily accessible for root cause isolation.
- Stale Statistics: Outdated statistics result in inefficient query execution plans and higher resource usage.
- Audit Log and Version Tables with Millions of Rows: These are among the largest contributors to system lag if not periodically archived or purged.
- Storage Throughput Bottlenecks: Performance issues often arise when database storage is not provisioned for sustained I/O workloads. We recommend evaluating storage configurations to ensure consistent IOPS and avoid throttling under peak load.
- No Tested Backup Restore Path: Backups exist, but restorations are either untested or improperly configured, leading to recovery risks.
How Leapwork Continuously Improves Queries
Leapwork is committed to ongoing performance optimization, not just at release time but throughout the product lifecycle. Here’s how we ensure your database performance continues to improve:
- Performance validation Every Release
- Each release is validated through performance tests that simulate high-volume automation scenarios. We proactively identify and fix slow queries or schema issues before shipping updates.
- Cloud Telemetry-Driven Improvements
- Our cloud environment provides real-time telemetry across diverse customer workloads. Insights from query patterns, deadlocks, and load trends help us fine-tune performance. These improvements are made available to on-premise customers via regular updates.
- Customer-Driven Optimization
- We work directly with customers who share long-running query data. When recurring issues are identified, we optimize those queries across the platform—not just for one customer, but for everyone.
Cloud vs. On-Premise
| Activity | Leapwork Cloud | On-Premise Deployment |
|---|---|---|
| DBA Ownership | Managed by Leapwork | Managed by customer |
| Index/Stats Maintenance | Automated and monitored | Customer responsibility |
| Backup Management | Included with hosting | While we don’t manage your backups, we’re happy to review your backup strategy and ensure it aligns with Leapwork’s recovery best practices |
| Performance Monitoring | Built-in dashboards + telemetry provided by Azure | Customer Responsibility. Manual activity and highly Recommended using SQL Profiler/DMVs |
| Infrastructure Scaling (Ramp-up/Ramp-down) | Automated scaling based on load: database compute tiers scale up or down to meet performance demands without customer intervention | Infrastructure must be manually provisioned, scaled, and optimized to handle changes in automation or user load |
Additional Tools Available (on request)
- SQL scripts for index monitoring, archival, and statistics refresh
- Query for largest tables by row count and size
- Sample maintenance job schedule
- Data Archival
For any clarification, please contact our Priority Support.