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
DanielRal (not verified)
Fri, 22/02/2019 - 01:46
Permalink
buy cialis online 62 mg
Howdy! cialis cheap excellent internet site.
DanielRal (not verified)
Fri, 22/02/2019 - 01:37
Permalink
buy cialis online 62 mg
Howdy! cialis cheap excellent internet site.
DanielRal (not verified)
Thu, 21/02/2019 - 21:26
Permalink
buy cialis pills 225 mg
Hi there! order tadalafil great site.
DanielRal (not verified)
Thu, 21/02/2019 - 21:19
Permalink
buy cialis pills 225 mg
Hi there! order tadalafil great site.
DanielRal (not verified)
Thu, 21/02/2019 - 16:45
Permalink
cialis online 188 mg
Hello there! purchase cialis excellent site.
DanielRal (not verified)
Thu, 21/02/2019 - 16:42
Permalink
cialis online 188 mg
Hello there! purchase cialis excellent site.
DanielRal (not verified)
Thu, 21/02/2019 - 16:37
Permalink
cialis online 188 mg
Hello there! purchase cialis excellent site.
DanielRal (not verified)
Thu, 21/02/2019 - 16:34
Permalink
cialis online 188 mg
Hello there! purchase cialis excellent site.
DanielRal (not verified)
Thu, 21/02/2019 - 12:23
Permalink
buy tadalafil online 236 mg
Hi there! buy tadalafil online good website.
DanielRal (not verified)
Thu, 21/02/2019 - 12:17
Permalink
buy tadalafil online 236 mg
Hi there! buy tadalafil online good website.
DanielRal (not verified)
Thu, 21/02/2019 - 12:07
Permalink
buy tadalafil online 236 mg
Hi there! buy tadalafil online good website.
DanielRal (not verified)
Thu, 21/02/2019 - 12:03
Permalink
buy tadalafil online 236 mg
Hi there! buy tadalafil online good website.
DanielRal (not verified)
Thu, 21/02/2019 - 07:37
Permalink
buy cialis no rx 60 mg
Hello there! buy cialis no rx good web page.
DanielRal (not verified)
Thu, 21/02/2019 - 07:29
Permalink
buy cialis no rx 60 mg
Hello there! buy cialis no rx good web page.
DanielRal (not verified)
Thu, 21/02/2019 - 07:22
Permalink
buy cialis no rx 60 mg
Hello there! buy cialis no rx good web page.
DanielRal (not verified)
Thu, 21/02/2019 - 07:18
Permalink
buy cialis no rx 60 mg
Hello there! buy cialis no rx good web page.
DanielRal (not verified)
Thu, 21/02/2019 - 02:57
Permalink
buy tadalafil no prescription 453 mg
Hi! buy cialis online without prescription very good internet site.
DanielRal (not verified)
Thu, 21/02/2019 - 02:48
Permalink
buy tadalafil no prescription 453 mg
Hi! buy cialis online without prescription very good internet site.
DanielRal (not verified)
Thu, 21/02/2019 - 02:38
Permalink
buy tadalafil no prescription 453 mg
Hi! buy cialis online without prescription very good internet site.
DanielRal (not verified)
Wed, 20/02/2019 - 22:01
Permalink
buy cialis cheap 291 mg
Hello! buy cialis usa great site.
ElmerReund (not verified)
Wed, 20/02/2019 - 09:56
Permalink
buy cialis online without prescription 205 mg
Hi! buy generic cialis beneficial site http://cialisxonline.com
ElmerReund (not verified)
Wed, 20/02/2019 - 09:52
Permalink
buy cialis online without prescription 205 mg
Hi! buy generic cialis beneficial site http://cialisxonline.com
BrianScors (not verified)
Wed, 13/02/2019 - 21:17
Permalink
hello
naturalne wybielanie zębów
http://pt.evsbyken.com/remedio-para-micose/micose-de-unhas-tratamento/
JamesIsogy (not verified)
Sun, 10/02/2019 - 18:39
Permalink
pharmacy technician training online 287 mg
Hello! pharmacies online very good site http://canadiantrustpharmacyio.com
JamesIsogy (not verified)
Sun, 10/02/2019 - 18:34
Permalink
pharmacy technician training online 287 mg
Hello! pharmacies online very good site http://canadiantrustpharmacyio.com
JamesIsogy (not verified)
Sun, 10/02/2019 - 18:32
Permalink
pharmacy technician training online 287 mg
Hello! pharmacies online very good site http://canadiantrustpharmacyio.com
JamesIsogy (not verified)
Sun, 10/02/2019 - 18:22
Permalink
pharmacy technician training online 287 mg
Hello! pharmacies online very good site http://canadiantrustpharmacyio.com
Jamescic (not verified)
Sun, 10/02/2019 - 14:46
Permalink
tadalafil 451 mg
Howdy! buy cialis pills beneficial website.
Jamescic (not verified)
Sun, 10/02/2019 - 14:39
Permalink
tadalafil 451 mg
Howdy! buy cialis pills beneficial website.
Jamescic (not verified)
Sun, 10/02/2019 - 10:23
Permalink
cialis online 203 mg
Howdy! purchase cialis beneficial site.
Jamescic (not verified)
Sun, 10/02/2019 - 10:15
Permalink
cialis online 203 mg
Howdy! purchase cialis beneficial site.
Jamescic (not verified)
Sun, 10/02/2019 - 10:10
Permalink
cialis online 203 mg
Howdy! purchase cialis beneficial site.
Jamescic (not verified)
Sun, 10/02/2019 - 06:06
Permalink
buy tadalafil online 414 mg
Hi there! buy cialis online without prescription beneficial website.
Jamescic (not verified)
Sun, 10/02/2019 - 05:58
Permalink
buy tadalafil online 414 mg
Hi there! buy cialis online without prescription beneficial website.
Jamescic (not verified)
Sun, 10/02/2019 - 01:46
Permalink
order cialis 349 mg
Hi! buy cialis usa excellent site.
Jamescic (not verified)
Sun, 10/02/2019 - 01:33
Permalink
order cialis 349 mg
Hi! buy cialis usa excellent site.
Jamescic (not verified)
Sun, 10/02/2019 - 01:24
Permalink
order cialis 349 mg
Hi! buy cialis usa excellent site.
Jamescic (not verified)
Sat, 09/02/2019 - 21:28
Permalink
buy cialis medication 157 mg
Hello! buy generic cialis great internet site.
Jamescic (not verified)
Sat, 09/02/2019 - 20:59
Permalink
buy cialis medication 157 mg
Hello! buy generic cialis great internet site.
Jamescic (not verified)
Sat, 09/02/2019 - 16:40
Permalink
order cialis 398 mg
Hello! cialis excellent internet site.
Jamescic (not verified)
Sat, 09/02/2019 - 16:28
Permalink
order cialis 398 mg
Hello! cialis excellent internet site.
Jamescic (not verified)
Sat, 09/02/2019 - 12:04
Permalink
buy cialis pills 266 mg
Hi! purchase cialis very good site.
Jamescic (not verified)
Sat, 09/02/2019 - 11:52
Permalink
buy cialis pills 266 mg
Hi! purchase cialis very good site.
Jamescic (not verified)
Sat, 09/02/2019 - 11:43
Permalink
buy cialis pills 266 mg
Hi! purchase cialis very good site.
Jamescic (not verified)
Sat, 09/02/2019 - 11:38
Permalink
buy cialis pills 266 mg
Hi! purchase cialis very good site.
Jamescic (not verified)
Sat, 09/02/2019 - 07:38
Permalink
buy tadalafil pills 354 mg
Hi there! cialis cheap good website.
Jamescic (not verified)
Sat, 09/02/2019 - 07:29
Permalink
buy tadalafil pills 354 mg
Hi there! cialis cheap good website.
Jamescic (not verified)
Sat, 09/02/2019 - 07:23
Permalink
buy tadalafil pills 354 mg
Hi there! cialis cheap good website.
Jamescic (not verified)
Sat, 09/02/2019 - 07:18
Permalink
buy tadalafil pills 354 mg
Hi there! cialis cheap good website.
Jamescic (not verified)
Sat, 09/02/2019 - 03:09
Permalink
tadalafil 73 mg
Hello there! cialis cheap good site.
Pages