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 |
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-07-22 : 01:26:24
|
i have two tables, one containing 100000 Rows and Other have 123000 rows. When i tried to get results with inner join, execution plan shows that a HASH MATCH taking time. Indexes are correctly applied.How can i enforce my query to use merg join instead of hash match ??? |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-07-22 : 03:34:16
|
Merge join is not that efficient on large tables.Merge join is most useful on smaller tables and the binding columns in the join both need to be clustered to be efficient.Hash join is the correct join type here. Hash match is used for aggregated queries and there is no way to stop that.May we see the query? E 12°55'05.25"N 56°04'39.16" |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-07-22 : 14:39:16
|
Hash joins are 2 type:In-memory hash and Grace hash joinIn-Memory hash are really faster and they are used when Big tables are joined with small tables but Grace hash joins are really Memory intensive. You can use option clause also but donot apply it unless you get performance gain. |
|
|
|
|
|