Pi Hydrae: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Bibcode Bot
m Adding 3 arxiv eprint(s), 0 bibcode(s) and 0 doi(s). Did it miss something? Report bugs, errors, and suggestions at User talk:Bibcode Bot
 
en>Monkbot
Line 1: Line 1:
Claude is her name and she  extended car [http://www.consumerautomotiveresearch.com/typesofwarranties.htm warranty completely] digs that title. Interviewing  extended car [http://www.nadelstich-mecky.de/index.php?mod=users&action=view&id=4380 auto warranty] is what she does but soon she'll be on her own. Delaware has usually been my  [http://racespace.org/groups/auto-repair-tips-make-your-car-running-smooth/ extended auto warranty] living place and will never move. One of the things I love most is [http://Blog.Caranddriver.com/buying-peace-of-mind-how-to-buy-a-used-car-warranty/ climbing] and now I have time to take on new things.<br><br>Visit my weblog :: [http://Yardleyvashon.com/abig/ActivityFeed/MyProfile/tabid/381/UserId/1767/Default.aspx http://Yardleyvashon.com/abig/ActivityFeed/MyProfile/tabid/381/UserId/1767/Default.aspx]
{{multiple issues|
{{no footnotes|date=October 2012}}
{{refimprove|date=November 2006}}
}}
A '''block-nested loop''' ('''BNL''') is an [[algorithm]] used to [[join (SQL)|join]] two relations in a [[relational database]].
 
This algorithm is a variation on the simple [[nested loop join]] used to join two relations <math>R</math> and <math>S</math> (the "outer" and "inner" join operands, respectively). Suppose <math>|R| < |S|</math>. In a traditional nested loop join, <math>S</math> will be scanned once for every tuple of <math>R</math>. If there are many qualifying <math>R</math> tuples, and particularly if there is no applicable index for the join key on <math>S</math>, this operation will be very expensive.
 
The block nested loop join algorithm improves on the simple nested loop join by only scanning <math>S</math> once for every ''group'' of <math>R</math> tuples. For example, one variant of the block nested loop join reads an entire [[page (computing)|page]] of <math>R</math> tuples into memory and loads them into a [[hash table]]. It then scans <math>S</math>, and probes the hash table to find <math>S</math> tuples that match any of the tuples in the current page of <math>R</math>. This reduces the number of scans of <math>S</math> that are necessary.
 
A more aggressive variant of this algorithm loads as many pages of <math>R</math> as can be fit in the available memory, loading all such tuples into a hash table, and then repeatedly scans <math>S</math>. This further reduces the number of scans of <math>S</math> that are necessary. In fact, this algorithm is essentially a special-case of the classic [[hash join]] algorithm.
 
The block nested loop runs in <math>O(P_r P_s/M)</math> I/Os where <math>M</math> is the number of available pages of internal memory and <math>P_r</math> and <math>P_s</math> is size of <math>R</math> and <math>S</math> respectively in pages. Note
that block nested loop runs in <math>O(P_r+P_s)</math> I/Os if <math>R</math> fits in the available internal memory.
 
==References==
{{Reflist}}
* [http://dev.mysql.com/doc/refman/5.6/en/bnl-bka-optimization.html Block Nested-Loop Joins] in the MySQL 5.6 Reference Manual.
 
{{DEFAULTSORT:Block Nested Loop}}
[[Category:Join algorithms]]

Revision as of 15:50, 28 January 2014

Template:Multiple issues A block-nested loop (BNL) is an algorithm used to join two relations in a relational database.

This algorithm is a variation on the simple nested loop join used to join two relations R and S (the "outer" and "inner" join operands, respectively). Suppose |R|<|S|. In a traditional nested loop join, S will be scanned once for every tuple of R. If there are many qualifying R tuples, and particularly if there is no applicable index for the join key on S, this operation will be very expensive.

The block nested loop join algorithm improves on the simple nested loop join by only scanning S once for every group of R tuples. For example, one variant of the block nested loop join reads an entire page of R tuples into memory and loads them into a hash table. It then scans S, and probes the hash table to find S tuples that match any of the tuples in the current page of R. This reduces the number of scans of S that are necessary.

A more aggressive variant of this algorithm loads as many pages of R as can be fit in the available memory, loading all such tuples into a hash table, and then repeatedly scans S. This further reduces the number of scans of S that are necessary. In fact, this algorithm is essentially a special-case of the classic hash join algorithm.

The block nested loop runs in O(PrPs/M) I/Os where M is the number of available pages of internal memory and Pr and Ps is size of R and S respectively in pages. Note that block nested loop runs in O(Pr+Ps) I/Os if R fits in the available internal memory.

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.