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
Craigwoomo (not verified)
Mon, 04/02/2019 - 22:50
Permalink
cialis online 469 mg
Hello! tadalafil cialis cheap finasteride good website
Craigwoomo (not verified)
Mon, 04/02/2019 - 22:47
Permalink
cialis online 469 mg
Hello! tadalafil cialis cheap finasteride good website
Craigwoomo (not verified)
Mon, 04/02/2019 - 22:44
Permalink
cialis online 469 mg
Hello! tadalafil cialis cheap finasteride good website
Craigwoomo (not verified)
Mon, 04/02/2019 - 19:07
Permalink
buy cialis cheap 430 mg
Hello! buy cialis with no prescription buy cialis online without prescription propecia cheap excellent web page
Craigwoomo (not verified)
Mon, 04/02/2019 - 19:06
Permalink
buy cialis cheap 430 mg
Hello! buy cialis with no prescription buy cialis online without prescription propecia cheap excellent web page
Craigwoomo (not verified)
Mon, 04/02/2019 - 19:02
Permalink
buy cialis cheap 430 mg
Hello! buy cialis with no prescription buy cialis online without prescription propecia cheap excellent web page
Craigwoomo (not verified)
Mon, 04/02/2019 - 18:56
Permalink
buy cialis cheap 430 mg
Hello! buy cialis with no prescription buy cialis online without prescription propecia cheap excellent web page
Craigwoomo (not verified)
Mon, 04/02/2019 - 15:16
Permalink
buy cialis medication 280 mg
Hello! buy cialis uk buy generic cialis order finasteride very good site
Craigwoomo (not verified)
Mon, 04/02/2019 - 15:14
Permalink
buy cialis medication 280 mg
Hello! buy cialis uk buy generic cialis order finasteride very good site
Craigwoomo (not verified)
Mon, 04/02/2019 - 15:05
Permalink
buy cialis medication 280 mg
Hello! buy cialis uk buy generic cialis order finasteride very good site
Craigwoomo (not verified)
Mon, 04/02/2019 - 14:56
Permalink
buy cialis medication 280 mg
Hello! buy cialis uk buy generic cialis order finasteride very good site
Craigwoomo (not verified)
Mon, 04/02/2019 - 10:54
Permalink
buy cialis pills online 459 mg
Hello there! buy generic cialis buy tadalafil online buy propecia cheap beneficial internet site
Craigwoomo (not verified)
Mon, 04/02/2019 - 10:53
Permalink
buy cialis pills online 459 mg
Hello there! buy generic cialis buy tadalafil online buy propecia cheap beneficial internet site
Craigwoomo (not verified)
Mon, 04/02/2019 - 10:43
Permalink
buy cialis pills online 459 mg
Hello there! buy generic cialis buy tadalafil online buy propecia cheap beneficial internet site
Craigwoomo (not verified)
Mon, 04/02/2019 - 10:38
Permalink
buy cialis pills online 459 mg
Hello there! buy generic cialis buy tadalafil online buy propecia cheap beneficial internet site
Craigwoomo (not verified)
Mon, 04/02/2019 - 06:19
Permalink
buy cialis pills 308 mg
Hi there! purchase cialis where buy cialis buy finasteride pills very good website
Craigwoomo (not verified)
Mon, 04/02/2019 - 06:17
Permalink
buy cialis pills 308 mg
Hi there! purchase cialis where buy cialis buy finasteride pills very good website
Craigwoomo (not verified)
Mon, 04/02/2019 - 06:16
Permalink
buy cialis pills 308 mg
Hi there! purchase cialis where buy cialis buy finasteride pills very good website
Craigwoomo (not verified)
Mon, 04/02/2019 - 06:15
Permalink
buy cialis pills 308 mg
Hi there! purchase cialis where buy cialis buy finasteride pills very good website
Craigwoomo (not verified)
Mon, 04/02/2019 - 02:26
Permalink
buy cialis 41 mg
Hi there! cialis cheap buy tadalafil no prescription buy finasteride online excellent website
Craigwoomo (not verified)
Mon, 04/02/2019 - 02:23
Permalink
buy cialis 41 mg
Hi there! cialis cheap buy tadalafil no prescription buy finasteride online excellent website
Craigwoomo (not verified)
Mon, 04/02/2019 - 02:20
Permalink
buy cialis 41 mg
Hi there! cialis cheap buy tadalafil no prescription buy finasteride online excellent website
Craigwoomo (not verified)
Mon, 04/02/2019 - 02:18
Permalink
buy cialis 41 mg
Hi there! cialis cheap buy tadalafil no prescription buy finasteride online excellent website
Craigwoomo (not verified)
Sun, 03/02/2019 - 22:58
Permalink
buy cialis medication 72 mg
Hello! tadalafil buy cialis medication purchase propecia online no prescription excellent internet site
Craigwoomo (not verified)
Sun, 03/02/2019 - 22:54
Permalink
buy cialis medication 72 mg
Hello! tadalafil buy cialis medication purchase propecia online no prescription excellent internet site
Craigwoomo (not verified)
Sun, 03/02/2019 - 22:51
Permalink
buy cialis medication 72 mg
Hello! tadalafil buy cialis medication purchase propecia online no prescription excellent internet site
Craigwoomo (not verified)
Sun, 03/02/2019 - 22:50
Permalink
buy cialis medication 72 mg
Hello! tadalafil buy cialis medication purchase propecia online no prescription excellent internet site
Craigwoomo (not verified)
Sun, 03/02/2019 - 19:33
Permalink
order cialis 371 mg
Hello there! buy generic cialis buy cialis no prescription buy finasteride pills very good web site
Craigwoomo (not verified)
Sun, 03/02/2019 - 19:30
Permalink
order cialis 371 mg
Hello there! buy generic cialis buy cialis no prescription buy finasteride pills very good web site
Craigwoomo (not verified)
Sun, 03/02/2019 - 19:23
Permalink
order cialis 371 mg
Hello there! buy generic cialis buy cialis no prescription buy finasteride pills very good web site
Craigwoomo (not verified)
Sun, 03/02/2019 - 08:19
Permalink
cialis 185 mg
Hi there! purchase tadalafil tadalafil buy generic propecia great site
Craigwoomo (not verified)
Sun, 03/02/2019 - 08:14
Permalink
cialis 185 mg
Hi there! purchase tadalafil tadalafil buy generic propecia great site
Craigwoomo (not verified)
Sun, 03/02/2019 - 05:29
Permalink
buy cialis online 65 mg
Howdy! purchase cialis order tadalafil propecia good site
Craigwoomo (not verified)
Sun, 03/02/2019 - 05:06
Permalink
buy cialis online 65 mg
Howdy! purchase cialis order tadalafil propecia good site
Craigwoomo (not verified)
Thu, 31/01/2019 - 23:44
Permalink
buy cialis online without prescription 361 mg
Hi! buy cialis cheap order cialis buy propecia medication great website
Craigwoomo (not verified)
Thu, 31/01/2019 - 20:50
Permalink
cialis online 251 mg
Hello there! buy generic cialis buy cialis no rx buy propecia cheap excellent web site
Craigwoomo (not verified)
Thu, 31/01/2019 - 20:39
Permalink
cialis online 251 mg
Hello there! buy generic cialis buy cialis no rx buy propecia cheap excellent web site
Craigwoomo (not verified)
Thu, 31/01/2019 - 20:35
Permalink
cialis online 251 mg
Hello there! buy generic cialis buy cialis no rx buy propecia cheap excellent web site
BianscaNow (not verified)
Wed, 30/01/2019 - 01:45
Permalink
online casino games
best online casino
free casino games online
casino movie online
free online casino
free online casino slots
BianscaNow (not verified)
Wed, 30/01/2019 - 01:32
Permalink
online casino games
best online casino
free casino games online
casino movie online
free online casino
free online casino slots
BianscaNow (not verified)
Wed, 30/01/2019 - 01:19
Permalink
online casino games
best online casino
free casino games online
casino movie online
free online casino
free online casino slots
Dorеismam (not verified)
Tue, 29/01/2019 - 23:50
Permalink
resorts casino online
casino online
online casino
free casino games online
online casino real money no deposit
free casino games online
CarcolZed (not verified)
Tue, 29/01/2019 - 18:56
Permalink
vegas casino games
casino online gambling
pogo casino slots
casino games slots
casino games free online
top rated free online casino games
CarcolZed (not verified)
Tue, 29/01/2019 - 18:54
Permalink
vegas casino games
casino online gambling
pogo casino slots
casino games slots
casino games free online
top rated free online casino games
CarcolZed (not verified)
Tue, 29/01/2019 - 18:49
Permalink
vegas casino games
casino online gambling
pogo casino slots
casino games slots
casino games free online
top rated free online casino games
Linzanut (not verified)
Tue, 29/01/2019 - 16:58
Permalink
casino online
pogo casino slots
casino online
new usa online casinos 2017
new usa online casinos 2017
casino online application
CarcolZed (not verified)
Tue, 29/01/2019 - 12:40
Permalink
casino online free
play casino games online
top rated free online casino games
pogo casino slots
casino online application
vegas casino games
CarcolZed (not verified)
Tue, 29/01/2019 - 12:34
Permalink
casino online free
play casino games online
top rated free online casino games
pogo casino slots
casino online application
vegas casino games
Linzanut (not verified)
Tue, 29/01/2019 - 10:41
Permalink
pogo casino slots
casino online free
casino online subtitrat
pogo casino slots
casino online usa
online casino real money
Linzanut (not verified)
Tue, 29/01/2019 - 10:29
Permalink
pogo casino slots
casino online free
casino online subtitrat
pogo casino slots
casino online usa
online casino real money
Pages