Tuning quick tips Getting the entire record before apply condition. -> Solution: Apply condition and paging before select. Using sub-query -> Solution: Turn it into join Using Table Variable being used with large data -> Solution: use Temp Table When a query performs badly, 3 things above are the most common causes I came across.… Continue reading SQL query performance tuning
Paginated query to SQL server is a very common logic that might be used literally everywhere. After googling a bit, the code below seems to be the best practice in 2020. The key point here is using Count(*) Over which allows getting list and total count at a single query. Select *, Count(*) Over ()… Continue reading SQL – Best way to get Total Count with pagination
Tools Resharper One of the most popular productivity tool for Visual Studio users. As Visual Studio keep adding the same functions introduced by Resharper, it’s getting pretty OK just use Visual Studio without Resharper. Still, I love using Resharper as it helps me focus on problem-solving. In particular, I like its continuous testing feature. Bad… Continue reading Tools and Libraries for an ASP.Net developer in 2018
I’ll install Hangfire with SQLite, which could be quick and easy solution for small projects, which do not need full blown DB server. Versions of each framework and libraries are as follow. APS.Net MVC 4.5.2 SQLite 184.108.40.206 Hangfire 220.127.116.11 Hangfire SQLite extension 18.104.22.168 Confusion selecting correct SQLite library. When go to http://hangfire.io/extensions.html page, we can see the… Continue reading Use Hangfire with SQLite in ASP.Net 4.5.
After using SQLite for a while, a few conclusions that I had were SQLite is quite stable enough to be used in corporate environment. SQLite is faster than SQLCE. For a SQLite admin, use the Firefox addon – https://addons.mozilla.org/de/firefox/addon/sqlite-manager/ SQL Server Compact Toolbox will be useful: https://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1 Both SQLite and SQLCE cannot be used in a… Continue reading SQLite in .Net