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
NormanAbota (not verified)
Wed, 27/02/2019 - 08:07
Permalink
buy valtrex medication 395 mg
Hello there! buy valtrex 500 mg buy propecia no prescription top 10 mail order pharmacies very good site
NormanAbota (not verified)
Wed, 27/02/2019 - 02:10
Permalink
buy valtrex no rx 192 mg
Hello! buy valacyclovir pills buy propecia usa legitimate canadian mail order pharmacies beneficial web page
NormanAbota (not verified)
Tue, 26/02/2019 - 20:40
Permalink
buy valtrex 100 mg 489 mg
Howdy! buy valacyclovir buy finasteride no prescription overseas pharmacies that deliver to usa good website
NormanAbota (not verified)
Tue, 26/02/2019 - 20:24
Permalink
buy valtrex 100 mg 489 mg
Howdy! buy valacyclovir buy finasteride no prescription overseas pharmacies that deliver to usa good website
NormanAbota (not verified)
Tue, 26/02/2019 - 15:02
Permalink
valtrex 449 mg
Hello! purchase valacyclovir finasteride approved canadian pharmacies online good website
NormanAbota (not verified)
Tue, 26/02/2019 - 03:25
Permalink
buy valtrex cheap 299 mg
Hello! buy valtrex buy finasteride pills canadian pharmacies top best beneficial site
NormanAbota (not verified)
Tue, 26/02/2019 - 03:15
Permalink
buy valtrex cheap 299 mg
Hello! buy valtrex buy finasteride pills canadian pharmacies top best beneficial site
NormanAbota (not verified)
Tue, 26/02/2019 - 03:09
Permalink
buy valtrex cheap 299 mg
Hello! buy valtrex buy finasteride pills canadian pharmacies top best beneficial site
NormanAbota (not verified)
Mon, 25/02/2019 - 22:13
Permalink
buy valtrex 500 mg 386 mg
Hello there! buy valtrex pills online buy propecia with no prescription pharmacy without dr prescriptions excellent site
NormanAbota (not verified)
Mon, 25/02/2019 - 21:55
Permalink
buy valtrex 500 mg 386 mg
Hello there! buy valtrex pills online buy propecia with no prescription pharmacy without dr prescriptions excellent site
NormanAbota (not verified)
Mon, 25/02/2019 - 17:34
Permalink
norco online pharmacy 72 mg
Hello there! generic viagra online pharmacy canadian online pharmacy no prior prescription required pharmacy great internet site
NormanAbota (not verified)
Mon, 25/02/2019 - 17:22
Permalink
norco online pharmacy 72 mg
Hello there! generic viagra online pharmacy canadian online pharmacy no prior prescription required pharmacy great internet site
NormanAbota (not verified)
Mon, 25/02/2019 - 17:16
Permalink
norco online pharmacy 72 mg
Hello there! generic viagra online pharmacy canadian online pharmacy no prior prescription required pharmacy great internet site
NormanAbota (not verified)
Mon, 25/02/2019 - 12:32
Permalink
pharmacy tech certification online 273 mg
Hi! pharmacies online mexico pharmacy online top rated canadian pharmacies online very good website
NormanAbota (not verified)
Mon, 25/02/2019 - 07:25
Permalink
online pharmacy technician schools 279 mg
Hi! online pharmacy online pharmacy technician schools discount rx great internet site
NormanAbota (not verified)
Mon, 25/02/2019 - 07:22
Permalink
online pharmacy technician schools 279 mg
Hi! online pharmacy online pharmacy technician schools discount rx great internet site
NormanAbota (not verified)
Mon, 25/02/2019 - 07:15
Permalink
online pharmacy technician schools 279 mg
Hi! online pharmacy online pharmacy technician schools discount rx great internet site
NormanAbota (not verified)
Mon, 25/02/2019 - 02:44
Permalink
pharmacy technician online program 435 mg
Hello there! cvs pharmacy application online reputable canadian online pharmacy international pharmacies that ship to the usa beneficial internet site
NormanAbota (not verified)
Mon, 25/02/2019 - 02:40
Permalink
pharmacy technician online program 435 mg
Hello there! cvs pharmacy application online reputable canadian online pharmacy international pharmacies that ship to the usa beneficial internet site
NormanAbota (not verified)
Sun, 24/02/2019 - 21:50
Permalink
canada pharmacy no prescription needed 212 mg
Hello! no prescription online pharmacy canadian pharmacy medicine mexico very good site
NormanAbota (not verified)
Sun, 24/02/2019 - 21:42
Permalink
canada pharmacy no prescription needed 212 mg
Hello! no prescription online pharmacy canadian pharmacy medicine mexico very good site
NormanAbota (not verified)
Sun, 24/02/2019 - 21:36
Permalink
canada pharmacy no prescription needed 212 mg
Hello! no prescription online pharmacy canadian pharmacy medicine mexico very good site
NormanAbota (not verified)
Sun, 24/02/2019 - 21:34
Permalink
canada pharmacy no prescription needed 212 mg
Hello! no prescription online pharmacy canadian pharmacy medicine mexico very good site
NormanAbota (not verified)
Sun, 24/02/2019 - 16:46
Permalink
cvs pharmacy job application online 440 mg
Hello! cgv online pharmacy canadian pharmacy viagra online online canadian pharmacies very good site
NormanAbota (not verified)
Sun, 24/02/2019 - 16:41
Permalink
cvs pharmacy job application online 440 mg
Hello! cgv online pharmacy canadian pharmacy viagra online online canadian pharmacies very good site
NormanAbota (not verified)
Sun, 24/02/2019 - 12:28
Permalink
ambien online pharmacy 82 mg
Howdy! online pharmacies in india no prescription online pharmacy canadian drugstore reviews good internet site
NormanAbota (not verified)
Sun, 24/02/2019 - 12:26
Permalink
ambien online pharmacy 82 mg
Howdy! online pharmacies in india no prescription online pharmacy canadian drugstore reviews good internet site
NormanAbota (not verified)
Sun, 24/02/2019 - 12:18
Permalink
ambien online pharmacy 82 mg
Howdy! online pharmacies in india no prescription online pharmacy canadian drugstore reviews good internet site
NormanAbota (not verified)
Sun, 24/02/2019 - 07:50
Permalink
canadian online pharmacy reviews 79 mg
Hello! health pharmacy online cvs pharmacy online refill no prescription pharmacy beneficial web site
NormanAbota (not verified)
Sun, 24/02/2019 - 07:40
Permalink
canadian online pharmacy reviews 79 mg
Hello! health pharmacy online cvs pharmacy online refill no prescription pharmacy beneficial web site
NormanAbota (not verified)
Sun, 24/02/2019 - 07:31
Permalink
canadian online pharmacy reviews 79 mg
Hello! health pharmacy online cvs pharmacy online refill no prescription pharmacy beneficial web site
NormanAbota (not verified)
Sun, 24/02/2019 - 02:52
Permalink
pharmacy online usa 36 mg
Howdy! testosterone online pharmacy cheap pharmacy online pharmacy online excellent internet site
NormanAbota (not verified)
Sun, 24/02/2019 - 02:50
Permalink
pharmacy online usa 36 mg
Howdy! testosterone online pharmacy cheap pharmacy online pharmacy online excellent internet site
NormanAbota (not verified)
Sun, 24/02/2019 - 02:47
Permalink
pharmacy online usa 36 mg
Howdy! testosterone online pharmacy cheap pharmacy online pharmacy online excellent internet site
NormanAbota (not verified)
Sun, 24/02/2019 - 02:43
Permalink
pharmacy online usa 36 mg
Howdy! testosterone online pharmacy cheap pharmacy online pharmacy online excellent internet site
NormanAbota (not verified)
Sat, 23/02/2019 - 22:18
Permalink
cheap online pharmacy 468 mg
Hello there! online pharmacy no prescription walgreen online pharmacy pharmacy without dr prescriptions great web page
NormanAbota (not verified)
Sat, 23/02/2019 - 22:09
Permalink
cheap online pharmacy 468 mg
Hello there! online pharmacy no prescription walgreen online pharmacy pharmacy without dr prescriptions great web page
NormanAbota (not verified)
Sat, 23/02/2019 - 21:57
Permalink
cheap online pharmacy 468 mg
Hello there! online pharmacy no prescription walgreen online pharmacy pharmacy without dr prescriptions great web page
DanielRal (not verified)
Sat, 23/02/2019 - 15:51
Permalink
tadalafil 369 mg
Hello! buy cialis uk good web site.
DanielRal (not verified)
Sat, 23/02/2019 - 15:45
Permalink
tadalafil 369 mg
Hello! buy cialis uk good web site.
DanielRal (not verified)
Sat, 23/02/2019 - 15:39
Permalink
tadalafil 369 mg
Hello! buy cialis uk good web site.
DanielRal (not verified)
Sat, 23/02/2019 - 15:33
Permalink
tadalafil 369 mg
Hello! buy cialis uk good web site.
DanielRal (not verified)
Sat, 23/02/2019 - 11:25
Permalink
tadalafil 114 mg
Hi there! buy tadalafil pills excellent internet site.
DanielRal (not verified)
Sat, 23/02/2019 - 06:26
Permalink
purchase cialis 469 mg
Howdy! buy tadalafil online great web site.
DanielRal (not verified)
Sat, 23/02/2019 - 02:02
Permalink
cialis online 51 mg
Howdy! buy tadalafil no prescription good internet site.
DanielRal (not verified)
Fri, 22/02/2019 - 16:30
Permalink
buy cialis 87 mg
Hello there! buy tadalafil pills beneficial web page.
DanielRal (not verified)
Fri, 22/02/2019 - 11:10
Permalink
cialis cheap 395 mg
Hello there! buy cialis medication great site.
DanielRal (not verified)
Fri, 22/02/2019 - 06:30
Permalink
buy tadalafil no prescription 122 mg
Hello! purchase cialis good internet site.
DanielRal (not verified)
Fri, 22/02/2019 - 06:11
Permalink
buy tadalafil no prescription 122 mg
Hello! purchase cialis good internet site.
DanielRal (not verified)
Fri, 22/02/2019 - 01:52
Permalink
buy cialis online 62 mg
Howdy! cialis cheap excellent internet site.
Pages