With a sort-merge join strategy, the DBMS will use a traditional merge on the two sorted files. If the two files are already sorted on the join column, then the cost is simply

C = be + bd = 10,000 + 5 = 10,005 block accesses.

If the files are unsorted, the cost of sorting must be factored into the equation. We approximate the sorting as Csort = blog2b for a file with b disk blocks.

C = be + bd + Csortbd + Csortbe = 10,000 + 5 + 140,000 + 10 = 150,015 block accesses.

If you need help with Sort-Merge Join

Ayoka is a Made in USA enterprise application services company with one clear objective: delivering the best customer service to all of our clients.  Ayoka’s commitment to Made in USA custom software development ensures that our client’s culture is understood, objectives are clearly communicated and allows us to provide tangible advice to our clients that are building custom enterprise applications that are essential to operating their modern business.

Ayoka continuously expands its collective custom software development knowledge and experience in leading web-based applications, as well as device, database, and application integration expertise. In addition to being a custom software development technology leader, our team of developers and project managers are engaging, collaborative, and innovative.

Ayoka’s custom software development culture combines the entrepreneurial feel of a start-up company with the confidence and stability of a successful professional services firm. Our vision is to become the ONLY choice for affordable enterprise software development and custom software development in AMERICA. We are proud of our consistent track record of delivering successful projects on time and on budget. We strive to provide custom software development projects that make our clients money. Get in touch today to see how Ayoka’s sort-merge join services can benefit your company.