query design

Grant UPDATE and SELECT on specific columns in a table – SQL Server

This post briefs how we can Grant UPDATE and SELECT permissions to specific columns of a table in SQL Server without using a view. So that, this partial vertical access control strategy can help us to manage the permissions directly at the table level. It is always good to set the access permissions at the […]

Grant UPDATE and SELECT on specific columns in a table – SQL Server Read More »

Get consecutive available seats in a row using SQL query

This post briefs how to get consecutive available seats in a row using SQL query for a multiplex cinema theatre that stores its data into a SQL Server database. In other words, we need to write a query to get n number of available consecutive seats for the multiplex seat booking application. However, for this

Get consecutive available seats in a row using SQL query Read More »

The join order has been enforced because a local join hint is used – Warning in SQL Server

When we use a local JOIN hint in T-SQL query, sometimes, SQL Server throws a warning message as “Warning: The join order has been enforced because a local join hint is used.“. For example, below is a query with a local join hint: After execution, we will get below warning message with result set: In above code, we are using

The join order has been enforced because a local join hint is used – Warning in SQL Server Read More »

Query Performance Tuning – General Guidelines

Query performance tuning – Introduction Query performance tuning is a process of improving system performance to make it faster and more scalable. It is a creative and iterative process which has a clear and well-defined objective. To achieve this goal, we have to follow certain defined steps. Why we need this Enterprise data changes frequently over

Query Performance Tuning – General Guidelines Read More »