SQL Server useful but less known features
-
Checking who is connected to the database
sp_who
SELECT
NULL as [Connections by Database],
[host_name] AS [Client Machine],
db.name AS [Database],
[program_name] AS [Client Program],
COUNT(*) AS [Open Connections]
FROM sys.dm_exec_sessions s (nolock)
LEFT JOIN sys.dm_exec_requests r (nolock) ON r.session_id = s.session_id
LEFT JOIN sys.databases db (nolock) ON db.database_id = r.database_id
WHERE s.session_id >= 50 -- Ignore SQL Server processes
GROUP BY [host_name], db.name, [program_name]
ORDER BY [Client Machine], [Database], [Client Program] -
Adjusting connection pooling settings
By default pool size is 100 per database with a command timeout (effectively a connection timeout) of 15 seconds. To increase add following to the connection string:
Connection Timeout=30;Pooling='true';Max Pool Size=200
-
Checking the size of column's contents
To check how much data the column contains:
SELECT *, DATALENGTH([column]) AS ColumnSizeInBytes FROM table
-
Using SQL Server profiler
Profiler is a powerful way to debug application performance problems, to check query execution time. If you're developing any application using SQL Server as a database, running it at least once for every application release can help with pinpointing possible performance issues. Remember the rule - there should be a constant number of queries regardless of the amount of records fetched - that way application will scale better. Sometimes it's better to replace a single complex query with more simpler queries because for each result row, columns shared by joins are repeated and delivered to client for processing many times.
Comments
Carolynerync (not verified)
Thu, 18/04/2019 - 11:12
Permalink
fast quick loans online
loan cash
speedy cash payday loans online
loans online only
fast quick loans online
online loans direct lenders
Carolynerync (not verified)
Thu, 18/04/2019 - 04:17
Permalink
small personal loans fast
payday loans definition
fast quick loans online
best fast loans online
best online loans instant approval
online loans direct lenders
Carolynerync (not verified)
Wed, 17/04/2019 - 21:35
Permalink
loans online application
payday loans bad credit
best fast loans online
best online loans instant approval
loans online no credit check
loan cash
optomaabsessy (not verified)
Tue, 16/04/2019 - 21:35
Permalink
optomaabsessy pange
wff casino online
optomaabsessy (not verified)
Tue, 16/04/2019 - 21:26
Permalink
optomaabsessy pange
wff casino online
Michaelvaw (not verified)
Tue, 16/04/2019 - 20:59
Permalink
oxycodone online pharmacy 480 mg
Howdy! online viagra pharmacy beneficial website.
Michaelvaw (not verified)
Tue, 16/04/2019 - 20:48
Permalink
oxycodone online pharmacy 480 mg
Howdy! online viagra pharmacy beneficial website.
Michaelvaw (not verified)
Tue, 16/04/2019 - 20:42
Permalink
oxycodone online pharmacy 480 mg
Howdy! online viagra pharmacy beneficial website.
Michaelvaw (not verified)
Mon, 15/04/2019 - 20:55
Permalink
online pharmacy viagra 453 mg
Hello! hcg injections online pharmacy excellent internet site.
Michaelvaw (not verified)
Mon, 15/04/2019 - 20:48
Permalink
online pharmacy viagra 453 mg
Hello! hcg injections online pharmacy excellent internet site.
Michaelvaw (not verified)
Mon, 15/04/2019 - 20:43
Permalink
online pharmacy viagra 453 mg
Hello! hcg injections online pharmacy excellent internet site.
Michaelvaw (not verified)
Mon, 15/04/2019 - 20:38
Permalink
online pharmacy viagra 453 mg
Hello! hcg injections online pharmacy excellent internet site.
Cynthiaboara (not verified)
Mon, 15/04/2019 - 11:38
Permalink
play casino games online
casino slots
casino bonus
new online casinos accepting usa
casino bonus codes
online casinos
Cynthiaboara (not verified)
Mon, 15/04/2019 - 11:28
Permalink
play casino games online
casino slots
casino bonus
new online casinos accepting usa
casino bonus codes
online casinos
Cynthiaboara (not verified)
Sun, 14/04/2019 - 21:38
Permalink
casino games free
new online casinos accepting usa
play casino
casino online
casino slots
free casino games slot machines
Michaelvaw (not verified)
Sun, 14/04/2019 - 19:41
Permalink
online pharmacies in india 298 mg
Hello! pharmacy technician course online good website.
Michaelvaw (not verified)
Sun, 14/04/2019 - 19:37
Permalink
online pharmacies in india 298 mg
Hello! pharmacy technician course online good website.
Michaelvaw (not verified)
Sun, 14/04/2019 - 19:27
Permalink
online pharmacies in india 298 mg
Hello! pharmacy technician course online good website.
JamiseLoK (not verified)
Sun, 14/04/2019 - 17:18
Permalink
best online casino games free
casino games
best online casino
real online casino
casino online
best online casino
Cynthiaboara (not verified)
Sun, 14/04/2019 - 15:24
Permalink
free casino games and poker
play casino
online casino
new online casinos accepting usa
casino slots
free online casino slots
Cynthiaboara (not verified)
Sun, 14/04/2019 - 15:15
Permalink
free casino games and poker
play casino
online casino
new online casinos accepting usa
casino slots
free online casino slots
FlordaVaf (not verified)
Sun, 14/04/2019 - 12:43
Permalink
online casino real money no deposit
online casino games
best online casino
casino online
play casino
free casino games slot machines
Tamhyten (not verified)
Sun, 14/04/2019 - 08:50
Permalink
nj online casino
online casino
bovada casino
new online casinos accepting usa
borgata online casino
play slots for real money united states
FlordaVaf (not verified)
Sun, 14/04/2019 - 06:31
Permalink
real online casino
list of casino slot machines
real casino play for free
online casino no deposit bonus
casino game
casino online slots
Tamhyten (not verified)
Sun, 14/04/2019 - 02:43
Permalink
nj online casino
online casino
casino slots
borgata online casino
real casino play for free
online casino games
fbasesse (not verified)
Sun, 14/04/2019 - 00:48
Permalink
gsfddskymnnoiv
http://drugstorepharmacyxerh.com/ - online canadian pharmacy generic viagra reviews walmart pharmacy online
FlordaVaf (not verified)
Sat, 13/04/2019 - 23:47
Permalink
resorts casino online
online casino
casino games
online casino games
best online casinos
casino online
FlordaVaf (not verified)
Sat, 13/04/2019 - 23:36
Permalink
resorts casino online
online casino
casino games
online casino games
best online casinos
casino online
Tamhyten (not verified)
Sat, 13/04/2019 - 20:16
Permalink
online casino usa
best online casino
casino slots
casino online
online casino
best online casinos
Michaelvaw (not verified)
Sat, 13/04/2019 - 19:44
Permalink
pharmacy technician classes online 282 mg
Hi! best online pharmacies beneficial website.
Michaelvaw (not verified)
Sat, 13/04/2019 - 19:41
Permalink
pharmacy technician classes online 282 mg
Hi! best online pharmacies beneficial website.
Michaelvaw (not verified)
Sat, 13/04/2019 - 19:28
Permalink
pharmacy technician classes online 282 mg
Hi! best online pharmacies beneficial website.
FlordaVaf (not verified)
Sat, 13/04/2019 - 17:43
Permalink
online casino real money no deposit
online casino games
casino bonus codes
casino games
casino games
best casino slots machine
IrejneHaf (not verified)
Sat, 13/04/2019 - 13:50
Permalink
casino games
new online casinos accepting usa
list of casino slot machines
casino slots
best online casino
casino bonus codes
real online casino
borgata online casino
free online casino
online casino
IrejneHaf (not verified)
Sat, 13/04/2019 - 13:40
Permalink
casino games
new online casinos accepting usa
list of casino slot machines
casino slots
best online casino
casino bonus codes
real online casino
borgata online casino
free online casino
online casino
fbasesse (not verified)
Sat, 13/04/2019 - 10:05
Permalink
gsfddskymntfsd
http://drugstorepharmacyxerh.com/ - canadian pharmacy meds viagra patent canada drugs online
BonhieWaf (not verified)
Sat, 13/04/2019 - 09:55
Permalink
online casino
online casinos
casino online
real casino play for free
casino bonus
online casino real money
play slots for real money united states
free casino games slot machines
best online casinos
casino online
IrejneHaf (not verified)
Sat, 13/04/2019 - 07:48
Permalink
online casino games
casino games
real online casino
online casino no deposit bonus
casino games
online casino games
empire city online casino
free online casino slots
play casino
casino game
IrejneHaf (not verified)
Sat, 13/04/2019 - 07:41
Permalink
online casino games
casino games
real online casino
online casino no deposit bonus
casino games
online casino games
empire city online casino
free online casino slots
play casino
casino game
BonhieWaf (not verified)
Sat, 13/04/2019 - 03:37
Permalink
casino blackjack
best online casino
free online casino
best online casinos
free online casino
borgata online casino
casino slots
casino slots
casino games
online casino
BonhieWaf (not verified)
Sat, 13/04/2019 - 03:24
Permalink
casino blackjack
best online casino
free online casino
best online casinos
free online casino
borgata online casino
casino slots
casino slots
casino games
online casino
IrejneHaf (not verified)
Sat, 13/04/2019 - 02:05
Permalink
online casino games
casino games
real casino play for free
casino blackjack
free online casino slots
play casino
casino games
casino online slots
borgata online casino
casino games
BonhieWaf (not verified)
Fri, 12/04/2019 - 20:43
Permalink
play slots for real money united states
casino slots
real casino play for free
free online casino slots
online casino
new online casinos accepting usa
play slots for real money united states
online casino
casino online
casino slots
IrejneHaf (not verified)
Fri, 12/04/2019 - 19:41
Permalink
best online casino
play slots for real money united states
free online casino slots
online casino
play slots for real money united states
online casino no deposit bonus
casino online
casino slots
free online casino
casino game
IrejneHaf (not verified)
Fri, 12/04/2019 - 19:39
Permalink
best online casino
play slots for real money united states
free online casino slots
online casino
play slots for real money united states
online casino no deposit bonus
casino online
casino slots
free online casino
casino game
IrejneHaf (not verified)
Fri, 12/04/2019 - 19:29
Permalink
best online casino
play slots for real money united states
free online casino slots
online casino
play slots for real money united states
online casino no deposit bonus
casino online
casino slots
free online casino
casino game
BonhieWaf (not verified)
Fri, 12/04/2019 - 14:22
Permalink
new online casinos accepting usa
play casino
free casino games slot machines
casino games
empire city online casino
online casino
online casino games
casino bonus codes
casino bonus
casino slots
IrejneHaf (not verified)
Fri, 12/04/2019 - 13:52
Permalink
best online casino
new online casinos accepting usa
casino game
casino bonus codes
best online casino
casino blackjack
free online casino slots
real casino play for free
casino online
casino games
IrejneHaf (not verified)
Fri, 12/04/2019 - 13:48
Permalink
best online casino
new online casinos accepting usa
casino game
casino bonus codes
best online casino
casino blackjack
free online casino slots
real casino play for free
casino online
casino games
IrejneHaf (not verified)
Fri, 12/04/2019 - 13:37
Permalink
best online casino
new online casinos accepting usa
casino game
casino bonus codes
best online casino
casino blackjack
free online casino slots
real casino play for free
casino online
casino games
Pages