What to choose for performance SubQuery or Joins Part 62
C#, SQL Server, WCF, MVC and ASP .NET video tutorials for beginners
What to choose for performance - SubQuery or Joins - Part 62
Link for text version of this video:
According to MSDN, in sql server, in most cases, there is usually no performance difference between queries that uses sub-queries and equivalent queries using joins. For example, on my machine I have
400,000 records in tblProducts table
600,000 records in tblProductSales tables
The following query, returns, the list of products that we have sold atleast once. This query is formed using sub-queries. When I execute this query I get 306,199 rows in 6 seconds
Select Id, Name, Description
from tblProducts
where ID IN
(
Select ProductId from tblProductSales
)
At this stage please clean the query and execution plan cache using the following T-SQL command.
CHECKPOINT;
GO
DBCC DROPCLEANBUFFERS;
Go
DBCC FREEPROCC
1 view
0
0
1 month ago 00:00:13 1
Да что ты черт побери такое несешь ? (Банды Нью-Йорка)
1 month ago 00:03:55 1
Pokemon GO Joystick, Teleport, Auto Walk - How to Get Pokemon GO Spoofer iOS & Android 2024 FREE
1 month ago 00:12:05 1
ZenBusiness Review 2024: What Makes It Stand Out?
1 month ago 00:04:14 1
Paramore: Decode [OFFICIAL VIDEO]
1 month ago 02:01:18 1
Half-Life 2: 20th Anniversary Documentary
1 month ago 00:03:07 1
Delta Executor iOS iPhone Android NO KEY - Roblox Script Executor Mobile NEW UPDATE 2024
1 month ago 00:00:32 1
…but the people are retarded
1 month ago 00:02:36 5
Jingle Bells | Christmas Song | Super Simple Songs
1 month ago 00:04:49 1
Play To Earn🔥This New Play to Earn Game is About to Make a Lot of People RICH
1 month ago 00:03:02 1
SPX Options Trading : Strategies for Big Gains!
1 month ago 00:19:15 1
RUN . Performing At their LAST SHOW EVER!! At Yankee Stadium HIP HOP 50 In Da BRONX
1 month ago 00:21:40 1
La Toya Jackson On Michael’s Allegations | What Changed Her Mind? | the detail.
1 month ago 00:37:34 1
Chorallas - Desert Lambs (1969) [Full Album]
1 month ago 00:03:31 1
The Hobbies Song for Kids | What Do You Like to Do? | Fun Kids English
1 month ago 00:25:19 1
Существа в открытом космосе возможны? / Большой Взрыв наоборот / Астрообзор #169
1 month ago 00:04:14 1
The Hunter - Bloodborne (4K UHD 2024)
1 month ago 00:26:26 1
LEGO Horizon Adventures PS5 Pro Gameplay - Thunderjaw Boss Fight
1 month ago 00:00:59 1
Melania Trump is doing things differently this time
1 month ago 00:05:15 1
Aeon Flux - “War“ (New Original Soundtrack and Sound Design)
1 month ago 00:08:38 1
Retired General on How Ukraine Is ‘Bleeding Out’ Against Russia | WSJ
2 months ago 00:13:57 1
Why did Davy Jones Look SO Realistic?
2 months ago 01:03:07 1
🔴 Amsterdam: The Shocking Truth the Media Won’t Tell You | Syriana Analysis