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
Jamescic (not verified)
Thu, 07/02/2019 - 19:45
Permalink
buy cialis no prescription 150 mg
Hi there! cialis very good site.
Jamescic (not verified)
Thu, 07/02/2019 - 19:42
Permalink
buy cialis no prescription 150 mg
Hi there! cialis very good site.
Jamescic (not verified)
Thu, 07/02/2019 - 15:50
Permalink
online pharmacy technician schools 307 mg
Hello! [url=http://onlineuspharmacies.party/#pharcharmy-online-no-precipitation]online pharmacy technician programs[/url] great website.
Jamescic (not verified)
Thu, 07/02/2019 - 15:48
Permalink
online pharmacy technician schools 307 mg
Hello! [url=http://onlineuspharmacies.party/#pharcharmy-online-no-precipitation]online pharmacy technician programs[/url] great website.
Jamescic (not verified)
Thu, 07/02/2019 - 15:45
Permalink
online pharmacy technician schools 307 mg
Hello! [url=http://onlineuspharmacies.party/#pharcharmy-online-no-precipitation]online pharmacy technician programs[/url] great website.
Jamescic (not verified)
Thu, 07/02/2019 - 15:42
Permalink
online pharmacy technician schools 307 mg
Hello! [url=http://onlineuspharmacies.party/#pharcharmy-online-no-precipitation]online pharmacy technician programs[/url] great website.
Jamescic (not verified)
Thu, 07/02/2019 - 11:59
Permalink
viagra online canadian pharmacy 250 mg
Howdy! testosterone online pharmacy great web page.
Jamescic (not verified)
Thu, 07/02/2019 - 11:53
Permalink
viagra online canadian pharmacy 250 mg
Howdy! testosterone online pharmacy great web page.
Jamescic (not verified)
Thu, 07/02/2019 - 11:46
Permalink
viagra online canadian pharmacy 250 mg
Howdy! testosterone online pharmacy great web page.
Jamescic (not verified)
Thu, 07/02/2019 - 07:57
Permalink
pharmacy tech online course 56 mg
Hi! online pharmacy technician school very good web page.
Jamescic (not verified)
Thu, 07/02/2019 - 07:39
Permalink
pharmacy tech online course 56 mg
Hi! online pharmacy technician school very good web page.
Jamescic (not verified)
Thu, 07/02/2019 - 07:29
Permalink
pharmacy tech online course 56 mg
Hi! online pharmacy technician school very good web page.
Jamescic (not verified)
Thu, 07/02/2019 - 03:37
Permalink
online pharmacy degree programs 137 mg
Howdy! ritalin online pharmacy excellent internet site.
Jamescic (not verified)
Thu, 07/02/2019 - 03:30
Permalink
online pharmacy degree programs 137 mg
Howdy! ritalin online pharmacy excellent internet site.
Jamescic (not verified)
Thu, 07/02/2019 - 03:22
Permalink
online pharmacy degree programs 137 mg
Howdy! ritalin online pharmacy excellent internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 23:37
Permalink
non prescription online pharmacy 480 mg
Hello! pharmacy technician course online excellent internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 23:31
Permalink
non prescription online pharmacy 480 mg
Hello! pharmacy technician course online excellent internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 23:25
Permalink
non prescription online pharmacy 480 mg
Hello! pharmacy technician course online excellent internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 19:09
Permalink
online pharmacys 493 mg
Hello there! online pharmacy oxycontin excellent web site.
Jamescic (not verified)
Wed, 06/02/2019 - 18:59
Permalink
online pharmacys 493 mg
Hello there! online pharmacy oxycontin excellent web site.
Jamescic (not verified)
Wed, 06/02/2019 - 18:50
Permalink
online pharmacys 493 mg
Hello there! online pharmacy oxycontin excellent web site.
Jamescic (not verified)
Wed, 06/02/2019 - 15:18
Permalink
online pharmacy technician course 496 mg
Hello! legal online pharmacy great site.
Jamescic (not verified)
Wed, 06/02/2019 - 11:39
Permalink
mexican online pharmacies 198 mg
Hi! universal online pharmacy beneficial site.
Jamescic (not verified)
Wed, 06/02/2019 - 08:19
Permalink
online pharmacy uk 351 mg
Hi! canada pharmacy no prescription beneficial internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 08:15
Permalink
online pharmacy uk 351 mg
Hi! canada pharmacy no prescription beneficial internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 08:12
Permalink
online pharmacy uk 351 mg
Hi! canada pharmacy no prescription beneficial internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 08:08
Permalink
online pharmacy uk 351 mg
Hi! canada pharmacy no prescription beneficial internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 05:09
Permalink
online canadian pharmacy review 185 mg
Hi! online pharmacy hydrocodone great website.
slaestjobe (not verified)
Wed, 06/02/2019 - 05:04
Permalink
ciprofloxacin 500mg sale - 373755866513
**669835168945620405 ciprofloxacin 500mg sale 858470930945 &&
Jamescic (not verified)
Wed, 06/02/2019 - 04:56
Permalink
online canadian pharmacy review 185 mg
Hi! online pharmacy hydrocodone great website.
slaestjobe (not verified)
Wed, 06/02/2019 - 04:56
Permalink
ciprofloxacin 500mg sale - 373755866513
**669835168945620405 ciprofloxacin 500mg sale 858470930945 &&
slaestjobe (not verified)
Wed, 06/02/2019 - 04:50
Permalink
ciprofloxacin 500mg sale - 373755866513
**669835168945620405 ciprofloxacin 500mg sale 858470930945 &&
Jamescic (not verified)
Wed, 06/02/2019 - 01:00
Permalink
live pharmacy ce online 113 mg
Hi! safe online pharmacies good internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 00:54
Permalink
live pharmacy ce online 113 mg
Hi! safe online pharmacies good internet site.
Jamescic (not verified)
Wed, 06/02/2019 - 00:42
Permalink
live pharmacy ce online 113 mg
Hi! safe online pharmacies good internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 20:30
Permalink
order from canadian pharmacy 379 mg
Hi! canadian pharmacy online good internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 20:26
Permalink
order from canadian pharmacy 379 mg
Hi! canadian pharmacy online good internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 20:24
Permalink
order from canadian pharmacy 379 mg
Hi! canadian pharmacy online good internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 20:19
Permalink
order from canadian pharmacy 379 mg
Hi! canadian pharmacy online good internet site.
Trendzgist (not verified)
Tue, 05/02/2019 - 17:23
Permalink
Trendzgist
Trendzgist is a leading entertainment and gists website that publishes trusted, accurate and factual news in a timely manner.
Mp3 Music Download
Download Burna Boy Songs
WIzkids top 10 collaboration
Olamide Songs Download
Jamescic (not verified)
Tue, 05/02/2019 - 16:31
Permalink
top rated online pharmacies 49 mg
Howdy! online pharmacy oxycontin very good web page.
Jamescic (not verified)
Tue, 05/02/2019 - 16:24
Permalink
top rated online pharmacies 49 mg
Howdy! online pharmacy oxycontin very good web page.
Jamescic (not verified)
Tue, 05/02/2019 - 16:19
Permalink
top rated online pharmacies 49 mg
Howdy! online pharmacy oxycontin very good web page.
Jamescic (not verified)
Tue, 05/02/2019 - 16:13
Permalink
top rated online pharmacies 49 mg
Howdy! online pharmacy oxycontin very good web page.
Jamescic (not verified)
Tue, 05/02/2019 - 12:08
Permalink
walgreen online pharmacy 37 mg
Hello there! xanax online pharmacy overnight beneficial internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 12:05
Permalink
walgreen online pharmacy 37 mg
Hello there! xanax online pharmacy overnight beneficial internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 12:00
Permalink
walgreen online pharmacy 37 mg
Hello there! xanax online pharmacy overnight beneficial internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 08:14
Permalink
pharmacy technician online program 498 mg
Hi! viagra online canadian pharmacy excellent internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 07:51
Permalink
pharmacy technician online program 498 mg
Hi! viagra online canadian pharmacy excellent internet site.
Jamescic (not verified)
Tue, 05/02/2019 - 07:47
Permalink
pharmacy technician online program 498 mg
Hi! viagra online canadian pharmacy excellent internet site.
Pages