Why This Error Happens
Error 3615 is not a failure message but an informational output generated by SET STATISTICS IO ON, reporting the number of times a table was accessed (scan count) and logical/physical reads during query execution. This message typically surfaces unexpectedly when diagnostic session settings are left enabled, when a query plan performs excessive scans due to missing or outdated indexes, or when statistics are stale causing the optimizer to choose inefficient access paths. In SQL Server 2025 on Windows Server 2025/Windows 11, this is most often tied to poor indexing strategy, outdated statistics, or diagnostic flags inadvertently left active in a session or connection pool.
Step-by-Step Resolution Guide
Step 1: Verify Session-Level Diagnostic Settings
- Open SQL Server Management Studio (SSMS) and check if
SET STATISTICS IO ONwas left active in the current session or a reused connection pool. - Run
SET STATISTICS IO OFF;to suppress the message if it is only a diagnostic artifact and not an actual performance issue. - Check connection string settings in your application (e.g.,
App.configorappsettings.json) for any lingering diagnostic flags.
Step 2: Update Statistics and Rebuild Indexes
- Navigate to SSMS → Object Explorer → Databases → [Your Database] → Tables → [Table Name] → Statistics.
- Run
UPDATE STATISTICS [TableName] WITH FULLSCAN;to refresh outdated statistics causing excessive scan counts. - Rebuild fragmented indexes using
ALTER INDEX ALL ON [TableName] REBUILD;especially if fragmentation exceeds 30%.
Step 3: Analyze the Execution Plan for Scan Inefficiencies
- In SSMS, enable “Include Actual Execution Plan” (Ctrl+M) and re-run the query to identify Table Scans or Index Scans contributing to the high scan count.
- Add missing indexes suggested by the execution plan, or create a covering index using
CREATE INDEX IX_TableName_Column ON [TableName] (Column) INCLUDE (OtherColumns);. - Check
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOGfor recurring scan-related warnings tied to specific queries.
Step 4: Validate Server and OS-Level Resource Constraints
- Open Windows Server 2025/Windows 11 Task Manager or Performance Monitor (
perfmon.exe) and check for memory pressure affecting SQL Server’s buffer cache, which can force repeated table scans. - Confirm SQL Server Max Server Memory is correctly configured via SSMS → Server Properties → Memory, leaving adequate RAM for the OS (typically 10-20% reserved).
- Restart the SQL Server service via
services.mscor runnet stop MSSQLSERVER && net start MSSQLSERVERif memory settings were adjusted.
Alternative or Verification Steps
- Re-run the query with
SET STATISTICS IO ON;intentionally and confirm scan counts have dropped to expected levels (ideally 1 per table for simple queries) after index/statistics updates. - If scan counts remain high, use Query Store (Database Properties → Query Store) to compare plan performance before and after changes, and force a better-performing plan if regression is detected.