Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why do Hash joins usually perform better than Merge Joins?

Answer Posted / narayana

In MERGE join rows to be join must be present in same AMP.. If the rows to be joined are not on the same AMP, Teradata will either redistribute the data or duplicate the data in spool to make that happen based on row hash of the columns involved in the joins WHERE Clause.Hash join takes place if one or both of the tables on each can fit completely inside the AMP's memory.AMP chooses to hold small tables in its memory for joins happening on ROW hash.
Usually optimizer will first identify a smaller table, and then sort it by the join column row hash sequence. If the smaller table is really small and can fit in the memory, the performance will be best. Otherwise, the sorted smaller table will be duplicated to all the AMPs. Then the larger table is processed one row at a time by doing a binary search against the smaller table for matched record.
Where as in MERGE join Columns to be join is Non INDEXED column. teradata will redistribute the table rows into SPOOL memory and sort them by hash code.So that matching data lies on same amp, so the join can happen on redistributed data

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is basic teradata query language?

1033


How many sessions of MAX is PE capable of handling at a particular time?

1034


Differentiate database data and data warehouse data?

1056


Explain the term 'foreign key' related to relational database management system?

959


What are the 5 phases in a multiload utility?

987


In Teradata, what is the significance of UPSERT command?

1134


My table got locked during mload due to a failed job. What do I do to perform other operations on it?

1041


What is meant by a dispatcher?

955


What are the updated features of teradata?

994


What is bteq utility in teradata?

918


What is the difference between teradata and oracle?

957


What are the main components of teradata system?

1068


What is the use of virtual processor connectivity in teradata?

943


How to write the query . eid enm doj dob i want to display the names who worked more than 25 years .

1725


how do you manage the production space. what are the proactive methods you can take ?

1884