Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
niranjankumark
Posting Yak Master
164 Posts |
Posted - 2009-03-06 : 06:24:52
|
have 2 query , want to know how the execution happens internally and performance.table1 = 9 lak recordstable2 = 8 lak recordsin with clause initially it will take 9 lak and 8 lak in teamp table and finally it will match the temp table( here a, b ) records.but in normal selection ( directly from table ) , it will access directly in table right ?in this case to join data will it populated data in some temp table ( in tempdb ) from that will it join ???? or without inserting in temp table will it match directly from actual table ???which one is better perforamance ???? wish how this execution happens internally ... so only asking with a as ( select c1,c2from table1 ) ,b as ( select c3,c4from table2 )select c1,c2,c3,c4from a,b where a.c1 = b.c3and a.c2 = b.c4============================select c1,c2,c3,c4from table1,table2where table1.c1 = table2.c3and table1.c2 = table2.c4============================ |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-03-06 : 07:56:55
|
Turn on the setting to show the execution plan. |
|
|
|
|
|
|
|