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
rgvEverm (not verified)
Sun, 30/12/2018 - 05:06
Permalink
buy cheap viagra bffbdxTiceacebycbt
viagra online generic viagra free samples generic viagra for sale
rgvEverm (not verified)
Sun, 30/12/2018 - 05:03
Permalink
buy cheap viagra bffbdxTiceacebycbt
viagra online generic viagra free samples generic viagra for sale
Brettirrix (not verified)
Sun, 30/12/2018 - 00:52
Permalink
b035j3tg
lasix cymbalta 50 mg seroquel for sleep cipro augmentin Cialis Over The Counter
jjnreAsP (not verified)
Sat, 29/12/2018 - 13:22
Permalink
cheapest brand viagra msfbjabokscg
when does viagra go generic what would happen if a girl took viagra generic viagra names
jjnreAsP (not verified)
Sat, 29/12/2018 - 13:13
Permalink
cheapest brand viagra msfbjabokscg
when does viagra go generic what would happen if a girl took viagra generic viagra names
FrankNeday (not verified)
Sat, 29/12/2018 - 11:59
Permalink
free cialis voucher 387 mg
free sample of viagra or cialis
free cialis coupon
cialis com free offer
cialis free sample
cialis free trial online
FrankNeday (not verified)
Sat, 29/12/2018 - 11:59
Permalink
free cialis voucher 387 mg
free sample of viagra or cialis
free cialis coupon
cialis com free offer
cialis free sample
cialis free trial online
FrankNeday (not verified)
Sat, 29/12/2018 - 11:56
Permalink
free cialis voucher 387 mg
free sample of viagra or cialis
free cialis coupon
cialis com free offer
cialis free sample
cialis free trial online
FrankNeday (not verified)
Sat, 29/12/2018 - 11:52
Permalink
free cialis voucher 387 mg
free sample of viagra or cialis
free cialis coupon
cialis com free offer
cialis free sample
cialis free trial online
ikkdielt (not verified)
Sat, 29/12/2018 - 09:57
Permalink
online generic viagra fbdlaFriedopbs
best places to buy generic viagra viagra 100mg generic viagra cost
ikkdielt (not verified)
Sat, 29/12/2018 - 09:48
Permalink
online generic viagra fbdlaFriedopbs
best places to buy generic viagra viagra 100mg generic viagra cost
nnxbophy (not verified)
Sat, 29/12/2018 - 05:35
Permalink
generic viagra cheap xnvmjUtedutxnu
cheap alternative to viagra cialis tadalafil cheap viagra online usa
nnxbophy (not verified)
Sat, 29/12/2018 - 05:32
Permalink
generic viagra cheap xnvmjUtedutxnu
cheap alternative to viagra cialis tadalafil cheap viagra online usa
nnxbophy (not verified)
Sat, 29/12/2018 - 05:28
Permalink
generic viagra cheap xnvmjUtedutxnu
cheap alternative to viagra cialis tadalafil cheap viagra online usa
FrankNeday (not verified)
Sat, 29/12/2018 - 05:15
Permalink
free cialis 89 mg
cialis 30 day free trial
cialis free 30 day trial
free sample of viagra or cialis
cialis com free sample
cialis daily
FrankNeday (not verified)
Sat, 29/12/2018 - 04:59
Permalink
free cialis 89 mg
cialis 30 day free trial
cialis free 30 day trial
free sample of viagra or cialis
cialis com free sample
cialis daily
Dannyvef (not verified)
Fri, 28/12/2018 - 23:57
Permalink
daily cialis 81 mg
free cialis trial
cialis coupon
free trial cialis online
free coupon for cialis
cialis free
Davidflued (not verified)
Fri, 28/12/2018 - 19:09
Permalink
cialis free trial 366 mg
cialis trial
cialis 5mg cost
cialis free trial
free sample cialis
free cialis trial
Davidflued (not verified)
Fri, 28/12/2018 - 12:41
Permalink
cialis free coupon 387 mg
cialis free 30 day trial
cialis free trial pack
free cialis trial online
how to get free cialis
cialis free voucher
RichardSlern (not verified)
Fri, 28/12/2018 - 11:07
Permalink
cialis free offer 75 mg
cialis com free sample
cialis free coupon
cialis 5mg cost
cialis free trial voucher
cialis com free trial
RichardSlern (not verified)
Fri, 28/12/2018 - 11:05
Permalink
cialis free offer 75 mg
cialis com free sample
cialis free coupon
cialis 5mg cost
cialis free trial voucher
cialis com free trial
Davidflued (not verified)
Fri, 28/12/2018 - 05:21
Permalink
cialis voucher 238 mg
free trials by mail
free cialis
free cialis offer
cialis free trial
free cialis pills
Davidflued (not verified)
Fri, 28/12/2018 - 05:17
Permalink
cialis voucher 238 mg
free trials by mail
free cialis
free cialis offer
cialis free trial
free cialis pills
RichardSlern (not verified)
Fri, 28/12/2018 - 04:51
Permalink
free cialis 172 mg
cialis 5mg cost
free cialis sample
free coupon for cialis
cialis free samples
cialis 30 day trial
nnxbophy (not verified)
Thu, 27/12/2018 - 18:37
Permalink
cheap viagra online xnvmjUtedutayh
cheap viagra free shipping order cialis cheap viagra from canada
GregoryFuh (not verified)
Mon, 24/12/2018 - 06:18
Permalink
online pharmacy viagra 398 mg
Hi there! norco online pharmacy very good site http://onlinegenepharmacy.com
GregoryFuh (not verified)
Mon, 24/12/2018 - 06:16
Permalink
online pharmacy viagra 398 mg
Hi there! norco online pharmacy very good site http://onlinegenepharmacy.com
GregoryFuh (not verified)
Mon, 24/12/2018 - 06:15
Permalink
online pharmacy viagra 398 mg
Hi there! norco online pharmacy very good site http://onlinegenepharmacy.com
GregoryFuh (not verified)
Mon, 24/12/2018 - 02:00
Permalink
pharmacy online usa 163 mg
Howdy! pharmacy tech certification online very good internet site http://onlinegenepharmacy.com
GregoryFuh (not verified)
Mon, 24/12/2018 - 01:55
Permalink
pharmacy online usa 163 mg
Howdy! pharmacy tech certification online very good internet site http://onlinegenepharmacy.com
GregoryFuh (not verified)
Mon, 24/12/2018 - 01:54
Permalink
pharmacy online usa 163 mg
Howdy! pharmacy tech certification online very good internet site http://onlinegenepharmacy.com
GregoryFuh (not verified)
Mon, 24/12/2018 - 01:50
Permalink
pharmacy online usa 163 mg
Howdy! pharmacy tech certification online very good internet site http://onlinegenepharmacy.com
Shawnnut (not verified)
Sun, 23/12/2018 - 17:56
Permalink
generic viagra online canadian pharmacy 58 mg
Hello there! online pharmacy technician certification beneficial internet site http://onlinepharmacycanadaus.com
Shawnnut (not verified)
Sun, 23/12/2018 - 15:47
Permalink
online canadian pharmacy reviews 193 mg
Hi there! online pharmacy technician great site http://onlinepharmacycanadaus.com
Shawnnut (not verified)
Sun, 23/12/2018 - 15:41
Permalink
online canadian pharmacy reviews 193 mg
Hi there! online pharmacy technician great site http://onlinepharmacycanadaus.com
Shawnnut (not verified)
Sun, 23/12/2018 - 11:45
Permalink
pharmacy technician certification online 81 mg
Hi there! pharmacies online great site http://onlinepharmacycanadaus.com
Shawnnut (not verified)
Sun, 23/12/2018 - 11:41
Permalink
pharmacy technician certification online 81 mg
Hi there! pharmacies online great site http://onlinepharmacycanadaus.com
Shawnnut (not verified)
Sun, 23/12/2018 - 11:40
Permalink
pharmacy technician certification online 81 mg
Hi there! pharmacies online great site http://onlinepharmacycanadaus.com
Shawnnut (not verified)
Sun, 23/12/2018 - 11:38
Permalink
pharmacy technician certification online 81 mg
Hi there! pharmacies online great site http://onlinepharmacycanadaus.com
Shawncag (not verified)
Sat, 22/12/2018 - 22:43
Permalink
hcg online pharmacy 172 mg
Hi! non prescription pharmacy beneficial internet site http://onlinepharmacycanadaus.com
Shawncag (not verified)
Sat, 22/12/2018 - 22:39
Permalink
hcg online pharmacy 172 mg
Hi! non prescription pharmacy beneficial internet site http://onlinepharmacycanadaus.com
Shawncag (not verified)
Sat, 22/12/2018 - 20:45
Permalink
provigil online pharmacy 212 mg
Hello there! pharmacy technician schools online beneficial website http://onlinepharmacycanadaus.com
Shawncag (not verified)
Sat, 22/12/2018 - 20:41
Permalink
provigil online pharmacy 212 mg
Hello there! pharmacy technician schools online beneficial website http://onlinepharmacycanadaus.com
DonaldDootA (not verified)
Sat, 22/12/2018 - 13:46
Permalink
pharmacies from Canada 411 mg
Hello! online mexican pharmacy great web page http://onlinepharmacycanadaus.com
Ellarem (not verified)
Fri, 13/09/2019 - 10:08
Permalink
Unidox Solutab In Usa Elloringe
Abuso De Kamagra Baclofene Nantes Buy Nosipren Prednisone 20mg Priligy Revenue
DonaldDootA (not verified)
Sat, 22/12/2018 - 13:41
Permalink
pharmacies from Canada 411 mg
Hello! online mexican pharmacy great web page http://onlinepharmacycanadaus.com
NathanHit (not verified)
Wed, 19/12/2018 - 06:03
Permalink
Online Prescriptions 219 mg
Hello there! compare prescription drug prices very good site http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Wed, 19/12/2018 - 04:41
Permalink
remote consultation online pharmacies 359 mg
Hi there! cialis coupon for pharmacy very good website http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Wed, 19/12/2018 - 04:37
Permalink
remote consultation online pharmacies 359 mg
Hi there! cialis coupon for pharmacy very good website http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Wed, 19/12/2018 - 02:50
Permalink
cialis 5mg at canadaian pharmacies 83 mg
Howdy! canada pharmacies free shipping very good web site http://canadiantrustpharmacyhd.com
Pages