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
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
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
NathanHit (not verified)
Wed, 19/12/2018 - 02:42
Permalink
cialis 5mg at canadaian pharmacies 83 mg
Howdy! canada pharmacies free shipping very good web site http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Wed, 19/12/2018 - 02:38
Permalink
cialis 5mg at canadaian pharmacies 83 mg
Howdy! canada pharmacies free shipping very good web site http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Tue, 18/12/2018 - 23:38
Permalink
canadian pharmacies cirlis 137 mg
Hi! canadian pharmacies generic viagra great web site http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Tue, 18/12/2018 - 23:28
Permalink
canadian pharmacies cirlis 137 mg
Hi! canadian pharmacies generic viagra great web site http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Tue, 18/12/2018 - 23:26
Permalink
canadian pharmacies cirlis 137 mg
Hi! canadian pharmacies generic viagra great web site http://canadiantrustpharmacyhd.com
NathanHit (not verified)
Tue, 18/12/2018 - 23:24
Permalink
canadian pharmacies cirlis 137 mg
Hi! canadian pharmacies generic viagra great web site http://canadiantrustpharmacyhd.com
Brettirrix (not verified)
Mon, 17/12/2018 - 06:15
Permalink
yc3pbsoq
tadacip 20 lexapro buspar lisinopril buy propecia online tadalafil 20mg lasix Torsemide buy real valtrex online prednisone tablets 5 mg
Brettirrix (not verified)
Mon, 17/12/2018 - 06:09
Permalink
yc3pbsoq
tadacip 20 lexapro buspar lisinopril buy propecia online tadalafil 20mg lasix Torsemide buy real valtrex online prednisone tablets 5 mg
AntioneGloro (not verified)
Mon, 17/12/2018 - 02:47
Permalink
buy cialis with no prescription 33 mg
Hello there! buy tadalafil buy finasteride association cialis et viagra great web site
AntioneGloro (not verified)
Mon, 17/12/2018 - 00:51
Permalink
buy cialis uk 132 mg
Howdy! purchase tadalafil purchase finasteride cialis mail very good website
AntioneGloro (not verified)
Mon, 17/12/2018 - 00:48
Permalink
buy cialis uk 132 mg
Howdy! purchase tadalafil purchase finasteride cialis mail very good website
AntioneGloro (not verified)
Sun, 16/12/2018 - 22:05
Permalink
buy cialis cheap 225 mg
Hello there! cialis buy propecia online without prescription viagra and cialis online excellent site
AntioneGloro (not verified)
Sun, 16/12/2018 - 22:00
Permalink
buy cialis cheap 225 mg
Hello there! cialis buy propecia online without prescription viagra and cialis online excellent site
AntioneGloro (not verified)
Sun, 16/12/2018 - 21:59
Permalink
buy cialis cheap 225 mg
Hello there! cialis buy propecia online without prescription viagra and cialis online excellent site
AntioneGloro (not verified)
Sun, 16/12/2018 - 21:57
Permalink
buy cialis cheap 225 mg
Hello there! cialis buy propecia online without prescription viagra and cialis online excellent site
Wesleyemunc (not verified)
Sun, 16/12/2018 - 04:15
Permalink
buy tadalafil pills 274 mg
Hello there! order cialis finasteride cialis tablets india tablets 20 mg excellent web page
Wesleyemunc (not verified)
Sun, 16/12/2018 - 02:28
Permalink
buy cialis 92 mg
Hello! [url=http://cialissmx.com/]buy cialis usa[/url] [url=http://propeciausfinasteridhq.com/]buy finasteride[/url] [url=http://cialissmx.com/]cialis profesional india[/url] excellent web page
Wesleyemunc (not verified)
Sun, 16/12/2018 - 02:23
Permalink
buy cialis 92 mg
Hello! [url=http://cialissmx.com/]buy cialis usa[/url] [url=http://propeciausfinasteridhq.com/]buy finasteride[/url] [url=http://cialissmx.com/]cialis profesional india[/url] excellent web page
AshleyVaf (not verified)
Sat, 15/12/2018 - 15:05
Permalink
buy cialis no prescription 171 mg
Hello! where buy cialis order finasteride double dose of cialis good site
AshleyVaf (not verified)
Sat, 15/12/2018 - 14:59
Permalink
buy cialis no prescription 171 mg
Hello! where buy cialis order finasteride double dose of cialis good site
AshleyVaf (not verified)
Sat, 15/12/2018 - 13:16
Permalink
cialis online 466 mg
Hi! purchase tadalafil buy propecia usa how can i buy cialis in a store in ct beneficial site
AshleyVaf (not verified)
Sat, 15/12/2018 - 13:12
Permalink
cialis online 466 mg
Hi! purchase tadalafil buy propecia usa how can i buy cialis in a store in ct beneficial site
AshleyVaf (not verified)
Sat, 15/12/2018 - 05:30
Permalink
cialis online 177 mg
Hi! purchase cialis online no prescription where buy propecia cialis 5mg daily dose price good web site
Pages