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

casino bonus
online casino
free casino games online
casino games
empire city online casino
nj online casino
casino blackjack
casino games online
casino bonus
free online casino

casino slots
online casino reviews
casino games
online casino games
best online casino
online casino real money no deposit
nj online casino
nj online casino
online casino reviews
online casino

casino slots
online casino reviews
casino games
online casino games
best online casino
online casino real money no deposit
nj online casino
nj online casino
online casino reviews
online casino

casino slots
online casino reviews
casino games
online casino games
best online casino
online casino real money no deposit
nj online casino
nj online casino
online casino reviews
online casino

real online casino
online casino
casino games online
casino games
casino games online
nj online casino
online casino reviews
online casino usa
best online casino
casino games online

real online casino
online casino
casino games online
casino games
casino games online
nj online casino
online casino reviews
online casino usa
best online casino
casino games online

best casino slots machine
free casino games online
casino slots
nj online casino
online casino real money no deposit
online casino no deposit bonus
online casino real money
casino blackjack
best online casino
online casino reviews

best casino slots machine
free casino games online
casino slots
nj online casino
online casino real money no deposit
online casino no deposit bonus
online casino real money
casino blackjack
best online casino
online casino reviews

payday loans online legit
online payday loans tx
payday loans definition
small personal loans fast
payday loans las vegas

payday loans online legit
online payday loans tx
payday loans definition
small personal loans fast
payday loans las vegas

online loans direct lenders
payday loans no credit check
loans online instant
loans online no credit check
payday loans no credit check

online payday loans tx
loans online no credit check
payday loans online bad credit
no credit check payday loans instant approval
loans online application

online payday loans tx
loans online no credit check
payday loans online bad credit
no credit check payday loans instant approval
loans online application

online loans direct lenders
loans online application
payday loans online bad credit
payday loans in az
payday loans online bad credit

online loans direct lenders
loans online application
payday loans online bad credit
payday loans in az
payday loans online bad credit

payday loans no credit check
fast quick loans online
trusted payday loans online
payday loans online legit
payday loans online legit

payday loans no credit check
fast quick loans online
trusted payday loans online
payday loans online legit
payday loans online legit

online payday loans tx
best fast loans online
loans online instant approval
payday loans online bad credit
loans online application

online payday loans tx
best fast loans online
loans online instant approval
payday loans online bad credit
loans online application

online payday loans tx
best fast loans online
loans online instant approval
payday loans online bad credit
loans online application

як видалити вайбера щоб сталися смс: https://texnoera.com/sekrety-viber-2

як видалити вайбера щоб сталися смс: https://texnoera.com/sekrety-viber-2

як видалити вайбера щоб сталися смс: https://texnoera.com/sekrety-viber-2

як видалити вайбера щоб сталися смс: https://texnoera.com/sekrety-viber-2

loans online instant approval
payday loans definition
best online loans instant approval
trusted payday loans online
best online loans instant approval

nj online casino
online casino
online casino real money no deposit
online casinos
casino blackjack
casino bonus
online casino
casino slots
online casino games
online casino usa

nj online casino
online casino
online casino real money no deposit
online casinos
casino blackjack
casino bonus
online casino
casino slots
online casino games
online casino usa

nj online casino
online casino
online casino real money no deposit
online casinos
casino blackjack
casino bonus
online casino
casino slots
online casino games
online casino usa

online casino real money
empire city online casino
online casino reviews
best casino slots machine
casino bonus
casino games online
best online casino
casino games online
best casino slots machine
best online casino

online casino real money
empire city online casino
online casino reviews
best casino slots machine
casino bonus
casino games online
best online casino
casino games online
best casino slots machine
best online casino

free online casino
casino blackjack
new online casinos accepting usa
casino games
free online casino
online casino reviews
nj online casino
casino blackjack
online casino
free online casino

free online casino
casino blackjack
new online casinos accepting usa
casino games
free online casino
online casino reviews
nj online casino
casino blackjack
online casino
free online casino

free online casino
casino blackjack
new online casinos accepting usa
casino games
free online casino
online casino reviews
nj online casino
casino blackjack
online casino
free online casino

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

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

casino blackjack
new online casinos accepting usa
best online casino
best online casino
online casinos
real online casino
casino games
online casino
best casino slots machine
online casinos

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

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

Pages