Blog Post

SubQuery Performance

Why would you do this?
select distinct(hostname),
(select count(*) as criticalCnt
from @temp where severity_guid='0168A833-1732-411E-8205-C2F6CD91737D'
and hostname=t.hostname
group by hostname),
(select count(*) as criticalCnt...

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2010-07-16

1,928 reads

Blogs

Memories of PASS Data Community Summit 2026

By

A bit of a photo dump, but a few fun memories for me from...

What's New in SQL Server for the Developer: SQL Server 2016

By

Part 2 of my What's New in SQL Server for the Developer series. STRING_SPLIT,...

The DBA Moves Up the Stack: From SQL Server on a VM to Azure SQL and Managed Instance

By

Note: This is more of a note to myself than an attempt to preach...

Read the latest Blogs

Forums

Layanan BCA KCU TULUNGAGUNG Telp:0821°8200°233

By layanan_Bca88

Telp/Wa 628218200233 Jl. Pangeran Diponegoro No.54, Tamanan, Kec. Tulungagung, Kabupaten Tulungagung, Jawa Timur 66217

Layanan BCA KCU HR MUHAMMAD Telp:0821°8200°203

By m4rt1n4

Telp/Wa 628218200203 Jl. Mayjen HR. Muhammad No.17, Putat Gede, Kec. Sukomanunggal, Surabaya, Jawa Timur...

Black Friday Gadgets

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Black Friday Gadgets

Visit the forum

Question of the Day

Switching Schema III

I run these queries:

SELECT COUNT(*) FROM dbo.Beer
SELECT COUNT(*) FROM etl.beer
I get 25 as the result for dbo.beer and 1 for the result for etl.beer. Both tables have identical sructures and both of these are nonpartitioned tables. I run this code:
ALTER TABLE dbo.beer switch TO etl.beer
go
SELECT COUNT(*) FROM dbo.Beer
SELECT COUNT(*) FROM etl.beer
What happens?

See possible answers