SQL


EF second layer cache to enhance your SQL database performance based on Redis

Entity-Framework Core is a lightweight, extensible, open-source, and cross-platform version of the popular Entity Framework data access technology. It really helps the developer to build applications which access database easily. But in most cases, we may cache some results which do not change frequently, to reduce access to our database. For example, the home page of a blog may not change …


Tips to get better performance for Entity Framework Core

Only get the data you need And the key reason for your slow query is it outputs too much data. Consider adding: Take(200), Skip() to take only the data you need or the current page requires. Use a pager to generate the report. This might helps a lot. Consider the following code (BAD Example) var myArticles = await _dbContext .Articles .Where(t => t.OwnerId == me.Id) . …


How to fix SQL Server database suspect status

In case our SQL Server database can't access, and telling you that it was in suspect status: Common reasons for the state are: The system cannot open the device where the data or log file is located The specified file was not found during the creation or opening of the physical device SQL Server crashes in the middle of the transaction Unable to access data or log files when going online …