Skip to content

TechObjects

Menu
Menu

SQL Not Choosing Correct Index – ForceSeek Hint

Posted on July 23, 2025July 23, 2025 by Jacob

I ran into an interesting scenario where SQL Server wasn’t utilizing an index and was table scanning. There was an existing index that it should have already been using. This caused queries to be slow and timeout. To resolve this we added a query hint called “FORCESEEK”. This forces the query optimizer to search for…

Read more

Pass by Reference vs Pass by Value

Posted on July 6, 2025 by Jacob

In C# passing by reference means you are essentially passing where an object is in memory. This means if you modify the object in a separate method then it updates the original object. An example of this is a Dictionary. Passing by reference utilizes the keyword ref or out. Passing by value which is the…

Read more

C# – Splitting CSV/ Looping

Posted on August 17, 2024July 4, 2025 by Jacob

This is a quick example of how to split a string into a string array and how to loop through the results. We then combine the results again changing the delimiter.

Read more

SQL – With NoLock Hint

Posted on June 23, 2024 by Jacob

When running a query against a database that is highly available and records can be accessed at any time, I typically use the “with (NoLock)” hint in my SQL statements. This ensures that if I’m accessing the same record as another user that we do not cause a deadlock. NoLock also runs slightly faster because…

Read more

SQL – Select Issue/ Timing

Posted on June 22, 2024 by Jacob

Running into SQL query issues can sometimes cause issues. One issue ran into today is that a query which was a simple select, but the “where” statement had an “or” in it and it wasn’t wrapped in parenthesis, which caused almost all table records to be returned. This caused the tempdb to fill up. If…

Read more

SQL Case Statement

Posted on June 20, 2024 by Jacob

Cases are used to return a specific value (hardcoded or field from the table) based on a condition. Example:

Read more

Microsoft SQL Server – Limiting Memory Usage

Posted on June 19, 2024June 19, 2024 by Jacob

To limit SQL servers’ memory usage SQL Server has a setting called “Maximum server memory (in MB)”. This setting is used to limit the amount of memory SQL server can use. By default, it can consume all memory and will release memory as other processes open on the system. When multiple instances of SQL are…

Read more

Most Viewed Posts

  • SQL Not Choosing Correct Index – ForceSeek Hint (809)
  • SQL Case Statement (517)
  • Microsoft SQL Server – Limiting Memory Usage (514)
  • SQL – With NoLock Hint (510)
  • C# – Splitting CSV/ Looping (494)
© 2026 TechObjects | Powered by Superbs Personal Blog theme