SQL Server useful but less known features

  • Posted on: 2 November 2016
  • By: Michał Turecki
  1. 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]

  2. 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

  3. Checking the size of column's contents

    To check how much data the column contains:

    SELECT *, DATALENGTH([column]) AS ColumnSizeInBytes FROM table

  4. 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

online casino usa no deposit
fastest payout online casino
online casino games nj
win money online casino
online casino bonus
online casino portal
online casino real money no download
play casino games free online
online casino free spins no deposit
online casino bonus
casino card game online
online casino bonus no deposit required
new casino online

online casino usa no deposit
fastest payout online casino
online casino games nj
win money online casino
online casino bonus
online casino portal
online casino real money no download
play casino games free online
online casino free spins no deposit
online casino bonus
casino card game online
online casino bonus no deposit required
new casino online

online casino usa no deposit
fastest payout online casino
online casino games nj
win money online casino
online casino bonus
online casino portal
online casino real money no download
play casino games free online
online casino free spins no deposit
online casino bonus
casino card game online
online casino bonus no deposit required
new casino online

winner casino online
bonus online casino
online casino winner
free online casino games no download no registration
online play casino roulette game
win real money online casino for free
zone online casino games
free online casino games win real money no deposit
online casino payouts
online casino in nj
casino slot online english
casino games free online
online casino free signup bonus no deposit required

winner casino online
bonus online casino
online casino winner
free online casino games no download no registration
online play casino roulette game
win real money online casino for free
zone online casino games
free online casino games win real money no deposit
online casino payouts
online casino in nj
casino slot online english
casino games free online
online casino free signup bonus no deposit required

winner casino online
bonus online casino
online casino winner
free online casino games no download no registration
online play casino roulette game
win real money online casino for free
zone online casino games
free online casino games win real money no deposit
online casino payouts
online casino in nj
casino slot online english
casino games free online
online casino free signup bonus no deposit required

winner casino online
bonus online casino
online casino winner
free online casino games no download no registration
online play casino roulette game
win real money online casino for free
zone online casino games
free online casino games win real money no deposit
online casino payouts
online casino in nj
casino slot online english
casino games free online
online casino free signup bonus no deposit required

online casino iphone
online casino games for real money
casino online free
casino online free bonus no deposit
free casino slots online no download with bonus rounds
free online casino no download
online casino real money free bonus
casino slot games online
online casino review
free online casino games win real money no deposit
bingo online casino
paypal casino online
a casino online

online casino iphone
online casino games for real money
casino online free
casino online free bonus no deposit
free casino slots online no download with bonus rounds
free online casino no download
online casino real money free bonus
casino slot games online
online casino review
free online casino games win real money no deposit
bingo online casino
paypal casino online
a casino online

online casino iphone
online casino games for real money
casino online free
casino online free bonus no deposit
free casino slots online no download with bonus rounds
free online casino no download
online casino real money free bonus
casino slot games online
online casino review
free online casino games win real money no deposit
bingo online casino
paypal casino online
a casino online

all jackpots online casino
free online casino games no downloads
paypal online casino
free casino slots online
1 online casino
online casino free play no deposit
online casino guide
free casino games online to play without downloading
online casino with free bonus without deposit
play free casino games online no download
online casino games for real money
online casino usa no deposit bonus
online casino real money usa

all jackpots online casino
free online casino games no downloads
paypal online casino
free casino slots online
1 online casino
online casino free play no deposit
online casino guide
free casino games online to play without downloading
online casino with free bonus without deposit
play free casino games online no download
online casino games for real money
online casino usa no deposit bonus
online casino real money usa

all jackpots online casino
free online casino games no downloads
paypal online casino
free casino slots online
1 online casino
online casino free play no deposit
online casino guide
free casino games online to play without downloading
online casino with free bonus without deposit
play free casino games online no download
online casino games for real money
online casino usa no deposit bonus
online casino real money usa

all jackpots online casino
free online casino games no downloads
paypal online casino
free casino slots online
1 online casino
online casino free play no deposit
online casino guide
free casino games online to play without downloading
online casino with free bonus without deposit
play free casino games online no download
online casino games for real money
online casino usa no deposit bonus
online casino real money usa

online casino promotions
free casino games online slots
play casino card game online
free online casino tournaments
online casino for us players
free online casino slot machine games
online casino games for real money for free
free online casino games no download no registration
casino online usa
online casino reviews usa
casino online usa
usa casino online
new jersey online casino

online casino promotions
free casino games online slots
play casino card game online
free online casino tournaments
online casino for us players
free online casino slot machine games
online casino games for real money for free
free online casino games no download no registration
casino online usa
online casino reviews usa
casino online usa
usa casino online
new jersey online casino

online casino promotions
free casino games online slots
play casino card game online
free online casino tournaments
online casino for us players
free online casino slot machine games
online casino games for real money for free
free online casino games no download no registration
casino online usa
online casino reviews usa
casino online usa
usa casino online
new jersey online casino

online casino promotions
free casino games online slots
play casino card game online
free online casino tournaments
online casino for us players
free online casino slot machine games
online casino games for real money for free
free online casino games no download no registration
casino online usa
online casino reviews usa
casino online usa
usa casino online
new jersey online casino

casino bonus
casino bonus
online casino usa
best online casino
casino games
nj online casino
online casino reviews
online casino real money no deposit
online casino
online casino usa

casino bonus
casino bonus
online casino usa
best online casino
casino games
nj online casino
online casino reviews
online casino real money no deposit
online casino
online casino usa

casino bonus
casino bonus
online casino usa
best online casino
casino games
nj online casino
online casino reviews
online casino real money no deposit
online casino
online casino usa

casino bonus
casino bonus
online casino usa
best online casino
casino games
nj online casino
online casino reviews
online casino real money no deposit
online casino
online casino usa

casino games
online casino reviews
online casino no deposit bonus
new online casinos accepting usa
online casino real money
online casinos
casino games online
online casino no deposit bonus
best casino slots machine
online casinos

casino games
online casino reviews
online casino no deposit bonus
new online casinos accepting usa
online casino real money
online casinos
casino games online
online casino no deposit bonus
best casino slots machine
online casinos

casino games
online casino reviews
online casino no deposit bonus
new online casinos accepting usa
online casino real money
online casinos
casino games online
online casino no deposit bonus
best casino slots machine
online casinos

casino games
online casino reviews
online casino no deposit bonus
new online casinos accepting usa
online casino real money
online casinos
casino games online
online casino no deposit bonus
best casino slots machine
online casinos

nj online casino
online casino real money no deposit
casino slots
online casino
online casino no deposit bonus
free online casino
online casino games
nj online casino
casino games
nj online casino

nj online casino
online casino real money no deposit
casino slots
online casino
online casino no deposit bonus
free online casino
online casino games
nj online casino
casino games
nj online casino

nj online casino
online casino real money no deposit
casino slots
online casino
online casino no deposit bonus
free online casino
online casino games
nj online casino
casino games
nj online casino

nj online casino
online casino real money no deposit
casino slots
online casino
online casino no deposit bonus
free online casino
online casino games
nj online casino
casino games
nj online casino

online casino real money no deposit
online casino usa
best online casino
casino blackjack
casino slots
online casinos
casino online
casino online
online casino reviews
online casino games

online casino real money no deposit
online casino usa
best online casino
casino blackjack
casino slots
online casinos
casino online
casino online
online casino reviews
online casino games

real online casino
new online casinos accepting usa
casino online
real online casino
online casino no deposit bonus
casino online
empire city online casino
online casino reviews
online casino games
casino slots

real online casino
new online casinos accepting usa
casino online
real online casino
online casino no deposit bonus
casino online
empire city online casino
online casino reviews
online casino games
casino slots

real online casino
new online casinos accepting usa
casino online
real online casino
online casino no deposit bonus
casino online
empire city online casino
online casino reviews
online casino games
casino slots

real online casino
new online casinos accepting usa
casino online
real online casino
online casino no deposit bonus
casino online
empire city online casino
online casino reviews
online casino games
casino slots

online casino usa
new online casinos accepting usa
online casino
online casino usa
empire city online casino
casino games
online casino real money
casino slots
online casino usa
casino games online

online casino usa
new online casinos accepting usa
online casino
online casino usa
empire city online casino
casino games
online casino real money
casino slots
online casino usa
casino games online

online casino usa
new online casinos accepting usa
online casino
online casino usa
empire city online casino
casino games
online casino real money
casino slots
online casino usa
casino games online

casino online
nj online casino
online casino no deposit bonus
online casino real money no deposit
list of casino slot machines
nj online casino
free casino games online
casino online
online casino reviews
casino games online

casino online
nj online casino
online casino no deposit bonus
online casino real money no deposit
list of casino slot machines
nj online casino
free casino games online
casino online
online casino reviews
casino games online

casino online
nj online casino
online casino no deposit bonus
online casino real money no deposit
list of casino slot machines
nj online casino
free casino games online
casino online
online casino reviews
casino games online

Pages