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
Ernestotah (not verified)
Wed, 10/07/2019 - 00:38
Permalink
buy viagra usa 344 mg
Hi there! buy viagra good website.
MiltonSOR (not verified)
Tue, 09/07/2019 - 22:16
Permalink
viagra cheap 338 mg
Howdy! viagra 100mg beneficial web site
Stewartskist (not verified)
Tue, 09/07/2019 - 22:15
Permalink
p5k6yymm
buy amoxicillin Trazodone hydrochlorothiazide 12.5 mg tablets amoxil buy clonidine synthroid buy online Buy Diflucan Metformin Er 1000 Mg levitra 20mg price buy ventolin vardenafil 20 mg
MiltonSOR (not verified)
Tue, 09/07/2019 - 22:13
Permalink
viagra cheap 338 mg
Howdy! viagra 100mg beneficial web site
MiltonSOR (not verified)
Tue, 09/07/2019 - 22:07
Permalink
viagra cheap 338 mg
Howdy! viagra 100mg beneficial web site
MiltonSOR (not verified)
Tue, 09/07/2019 - 22:04
Permalink
viagra cheap 338 mg
Howdy! viagra 100mg beneficial web site
Stewartskist (not verified)
Tue, 09/07/2019 - 21:58
Permalink
p5k6yymm
buy amoxicillin Trazodone hydrochlorothiazide 12.5 mg tablets amoxil buy clonidine synthroid buy online Buy Diflucan Metformin Er 1000 Mg levitra 20mg price buy ventolin vardenafil 20 mg
Stepplups (not verified)
Tue, 09/07/2019 - 20:50
Permalink
Viagra Pfizer Pas Cher En Quimper Elllayego
Kamagra En Ligne En Suisse Comprar Levitra Sin Receta En Madrid Cheap Acyclovir Fast levitra for sale Discount Nexium Prescription
Stepplups (not verified)
Tue, 09/07/2019 - 20:40
Permalink
Viagra Pfizer Pas Cher En Quimper Elllayego
Kamagra En Ligne En Suisse Comprar Levitra Sin Receta En Madrid Cheap Acyclovir Fast levitra for sale Discount Nexium Prescription
MatUtibra (not verified)
Tue, 09/07/2019 - 08:07
Permalink
Antabuse Disulfiram Online MatUtibra
Tamoxifene Arrow Using Cephalexin On Pregnant Dogs Dapoxetine Chlorhydrate propecia caracas Generic For Cialis Buy Dexamethasone Online order accutane online no prescription
MatUtibra (not verified)
Tue, 09/07/2019 - 08:02
Permalink
Antabuse Disulfiram Online MatUtibra
Tamoxifene Arrow Using Cephalexin On Pregnant Dogs Dapoxetine Chlorhydrate propecia caracas Generic For Cialis Buy Dexamethasone Online order accutane online no prescription
MatUtibra (not verified)
Tue, 09/07/2019 - 07:54
Permalink
Antabuse Disulfiram Online MatUtibra
Tamoxifene Arrow Using Cephalexin On Pregnant Dogs Dapoxetine Chlorhydrate propecia caracas Generic For Cialis Buy Dexamethasone Online order accutane online no prescription
Michaelexpor (not verified)
Tue, 09/07/2019 - 07:27
Permalink
aetna online pharmacy 436 mg
Hi there! online pharmacy oxycodone 30mg great internet site.
Michaelexpor (not verified)
Tue, 09/07/2019 - 07:18
Permalink
aetna online pharmacy 436 mg
Hi there! online pharmacy oxycodone 30mg great internet site.
Michaelexpor (not verified)
Tue, 09/07/2019 - 07:15
Permalink
aetna online pharmacy 436 mg
Hi there! online pharmacy oxycodone 30mg great internet site.
MiltonSOR (not verified)
Tue, 09/07/2019 - 02:19
Permalink
buy viagra medication 91 mg
Hello there! buy viagra pills online great web site
MiltonSOR (not verified)
Tue, 09/07/2019 - 02:16
Permalink
buy viagra medication 91 mg
Hello there! buy viagra pills online great web site
MiltonSOR (not verified)
Tue, 09/07/2019 - 02:10
Permalink
buy viagra medication 91 mg
Hello there! buy viagra pills online great web site
Stepplups (not verified)
Tue, 09/07/2019 - 01:23
Permalink
Acheter Du Cialis Ligne Elllayego
Fineviagra cialis Dutasteride Website Cialis Dose Amoxicillin With Other Drugs
Stepplups (not verified)
Tue, 09/07/2019 - 01:16
Permalink
Acheter Du Cialis Ligne Elllayego
Fineviagra cialis Dutasteride Website Cialis Dose Amoxicillin With Other Drugs
VirgilStots (not verified)
Tue, 09/07/2019 - 00:14
Permalink
best online pharmacy viagra 372 mg
Howdy! pharmacy technician online program beneficial web site
VirgilStots (not verified)
Tue, 09/07/2019 - 00:11
Permalink
best online pharmacy viagra 372 mg
Howdy! pharmacy technician online program beneficial web site
MiltonSOR (not verified)
Mon, 08/07/2019 - 03:25
Permalink
viagra 100mg 321 mg
Hello! buy viagra medication very good web site
VirgilStots (not verified)
Mon, 08/07/2019 - 03:22
Permalink
online pharmacy technician programs 466 mg
Howdy! pharmacy technician online courses great site
Brettirrix (not verified)
Mon, 08/07/2019 - 03:22
Permalink
kgavz9zh
Citalopram
MiltonSOR (not verified)
Mon, 08/07/2019 - 03:19
Permalink
viagra 100mg 321 mg
Hello! buy viagra medication very good web site
VirgilStots (not verified)
Mon, 08/07/2019 - 03:17
Permalink
online pharmacy technician programs 466 mg
Howdy! pharmacy technician online courses great site
VirgilStots (not verified)
Mon, 08/07/2019 - 03:15
Permalink
online pharmacy technician programs 466 mg
Howdy! pharmacy technician online courses great site
MiltonSOR (not verified)
Mon, 08/07/2019 - 03:14
Permalink
viagra 100mg 321 mg
Hello! buy viagra medication very good web site
MiltonSOR (not verified)
Mon, 08/07/2019 - 03:10
Permalink
viagra 100mg 321 mg
Hello! buy viagra medication very good web site
LesKern (not verified)
Sun, 07/07/2019 - 05:06
Permalink
Propecia While On Accutane Drug LesKern
Para Que Sirve El Viagra Yahoo Price Canada Buy Propecia generic viagra Impotencia Propecia Propecia Treatments Buy Nexium Esomeprazole
LesKern (not verified)
Sun, 07/07/2019 - 04:58
Permalink
Propecia While On Accutane Drug LesKern
Para Que Sirve El Viagra Yahoo Price Canada Buy Propecia generic viagra Impotencia Propecia Propecia Treatments Buy Nexium Esomeprazole
RebImparf (not verified)
Sun, 07/07/2019 - 02:39
Permalink
Propecia Side Effects Long Term All Prescription Kelattict
Viagra Generic Dealers In Canada Generique Finasteride viagra Acheter Cialis Pharmacie France Diclofenac Buy Online
RebImparf (not verified)
Sun, 07/07/2019 - 02:36
Permalink
Propecia Side Effects Long Term All Prescription Kelattict
Viagra Generic Dealers In Canada Generique Finasteride viagra Acheter Cialis Pharmacie France Diclofenac Buy Online
RebImparf (not verified)
Sun, 07/07/2019 - 02:31
Permalink
Propecia Side Effects Long Term All Prescription Kelattict
Viagra Generic Dealers In Canada Generique Finasteride viagra Acheter Cialis Pharmacie France Diclofenac Buy Online
RebImparf (not verified)
Sun, 07/07/2019 - 02:25
Permalink
Propecia Side Effects Long Term All Prescription Kelattict
Viagra Generic Dealers In Canada Generique Finasteride viagra Acheter Cialis Pharmacie France Diclofenac Buy Online
Michaelexpor (not verified)
Fri, 05/07/2019 - 13:59
Permalink
buy propecia cvs 486 mg
Hello there! best place to order propecia great internet site.
Michaelexpor (not verified)
Fri, 05/07/2019 - 13:56
Permalink
buy propecia cvs 486 mg
Hello there! best place to order propecia great internet site.
Michaelexpor (not verified)
Fri, 05/07/2019 - 13:54
Permalink
buy propecia cvs 486 mg
Hello there! best place to order propecia great internet site.
Michaelexpor (not verified)
Fri, 05/07/2019 - 13:46
Permalink
buy propecia cvs 486 mg
Hello there! best place to order propecia great internet site.
Stewartskist (not verified)
Fri, 05/07/2019 - 10:21
Permalink
34m8f7m2
BUY AMOXICILLIN
Stepplups (not verified)
Thu, 04/07/2019 - 21:52
Permalink
Keflex 500mg 3 Times A Day Elllayego
Low Cost Alternatives And Viagra cheap cialis online Viagra Foros Cialis Spedizione 24 Ore
Stepplups (not verified)
Thu, 04/07/2019 - 21:47
Permalink
Keflex 500mg 3 Times A Day Elllayego
Low Cost Alternatives And Viagra cheap cialis online Viagra Foros Cialis Spedizione 24 Ore
Michaelexpor (not verified)
Thu, 04/07/2019 - 20:57
Permalink
cheap propecia online uk 482 mg
Hi there! cheapest way to buy propecia very good web page.
Michaelexpor (not verified)
Thu, 04/07/2019 - 20:54
Permalink
cheap propecia online uk 482 mg
Hi there! cheapest way to buy propecia very good web page.
Michaelexpor (not verified)
Thu, 04/07/2019 - 20:48
Permalink
cheap propecia online uk 482 mg
Hi there! cheapest way to buy propecia very good web page.
Michaelexpor (not verified)
Thu, 04/07/2019 - 20:44
Permalink
cheap propecia online uk 482 mg
Hi there! cheapest way to buy propecia very good web page.
Michaelexpor (not verified)
Thu, 04/07/2019 - 03:06
Permalink
buy non generic propecia 408 mg
Hi! where can i buy propecia in the us very good web site.
Michaelexpor (not verified)
Thu, 04/07/2019 - 03:00
Permalink
buy non generic propecia 408 mg
Hi! where can i buy propecia in the us very good web site.
Michaelexpor (not verified)
Thu, 04/07/2019 - 02:55
Permalink
buy non generic propecia 408 mg
Hi! where can i buy propecia in the us very good web site.
Pages