SQL query performance tuning

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

SQL – Best way to get Total Count with pagination

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

C# Performance Improvement Experience

I have a personal code originally wriiten in 10 years ago when I was starting coding in University. The code is basically stock price analysis tool.  Recently I started to look at it again and found a few tips to improve the performance calculation and DB access heavy code. Actually, this shouldn’t be DB access… Continue reading C# Performance Improvement Experience

DDD Perth 2019

DDDPerth

DDD Perth 2019 looks get bigger than 2018. 835 developers joined and more than 200 were in waiting list. Food got better than last year. Multiple coffee post was another small improvement as there was a massive queue last year on a single coffee post. What I couldn’t understand is that there were 6 tracks… Continue reading DDD Perth 2019

JavaScript best practice summary – Jonathan Mills from Pluralsight

Syntax – consistency is the king. Use semicolons. Use Linting. e.g. ESLint or JSHint Curly braces should start in the same line of command, which is different from C#, etc. Equality. Use === whenever possible. Write variable, function, caller in order. Behaviors – use strict mode. Use var if it’s not for a global variable… Continue reading JavaScript best practice summary – Jonathan Mills from Pluralsight