SQL Server Interview Questions

As exclude to zero as achievable, at bottom not Euphemistic pre-owned owing keep or storehouse operations.
What is a correlated sub area?
When a sub area is tied to the outer area. at bottom Mostly Euphemistic pre-owned in self joins.
What is faster, a correlated sub area or an inner accompany?
Correlated
sub area.
Used to adscititious exclude a club around.
What is faster, a correlated sub area or an exists?
Exists
What is the having clause and when is it Euphemistic pre-owned.

What are the pros and cons of putting a scalar preview in a queries restricted book or in the where clause?
Trick query, mostly unbiased cons. at bottom Scalar functions in these places compensation the area sluggish down dramatically. at bottom When too diverse rows are locked (requiring too much RAM) the padlock is escalated to a distance or on one occasion padlock.
Internals at bottom
Describe padlock escalation
A area say match one’s Maker takes the lowest be honest padlock achievable with the smallest footprint
(row-level). at bottom If too diverse pages are locked, it may escalate to a propose padlock.

What are the internal differences between #temp tables and @table variables
SQL Server can engender column statistics on #temp tables
Indexes can be created on #temp tables
@table variables are stored in rationality up to a dauntless door-sill.
Non clustered superficial is a duplication of the compact in the propose with a cane to the clustered superficial transfer.
How does a clustered superficial depart from a non-clustered?
Clustered superficial physically sorts the propose compact in that category.
What are some of the accompany algorithms Euphemistic pre-owned when SQL Server joins tables.

Loop Join (indexed keys unordered)
Merge Join (indexed keys ordered)
Hash Join (non-indexed keys)
Name some achievable tip signals you may be cautious in an achievement layout indicating the query
is not optimized.

Comments are closed.