सभी किताबें

पेशेवर

1 Markets I: The Ecosystem and Exchange-Traded Marketsबाज़ार ऑनलाइन 2 Markets II: Rates, FX and Creditबाज़ार ऑनलाइन 3 Markets III: Commodities, Energy and Cryptoबाज़ार ऑनलाइन 4 Quantitative Methodsविधियाँ ऑनलाइन 5 Derivatives and Volatilityडेरिवेटिव्स ऑनलाइन 6 Rates, Credit, XVA and Riskब्याज दरें, क्रेडिट और जोखिम ऑनलाइन 7 Research Craft: Predictors, Backtests, Measurement, Portfoliosअनुसंधान ऑनलाइन 8 Strategies I: Equities and Futuresरणनीतियाँ ऑनलाइन 9 Strategies II: Volatility, Relative Value, Macro and the Bank Desksरणनीतियाँ ऑनलाइन 10 Microstructure and Executionनिष्पादन ऑनलाइन 11 Market Making and High-Frequency Tradingमार्केट मेकिंग ऑनलाइन 12 Machine Learning for Marketsमशीन लर्निंग ऑनलाइन 13 Low-Latency Softwareतकनीक ऑनलाइन 14 Networks, Hardware and Trading Infrastructureतकनीक ऑनलाइन 15 Research, Data and Risk Platformsतकनीक ऑनलाइन 16 The Desk and the Firmफ़र्म ऑनलाइन 17 The Industry: Firms, Roles and Careersकरियर ऑनलाइन 18 Interviews I: Maths, Probability and Speedकरियर ऑनलाइन 19 Interviews II: Markets, Trading Games and the Final Roundकरियर ऑनलाइन 20 Interviews III: Codeकरियर ऑनलाइन
ऐप्स परिचय Coach लॉग इन पढ़ना शुरू करें

Computer Science · शब्दावली

Nested-loop, block nested-loop, index nested-loop, sort–merge and hash joins क्या है?

अन्य नाम: nested-loop join · block nested-loop join · index nested-loop join · sort--merge join · hash join

Definition 22.4 University Computer Science — Year 3 · अध्याय 22 — Query Processing and Optimisation

Let RR have MM pages and ∣R∣|R| tuples, SS have NN pages, and BB buffer pages be free. The nested-loop join scans SS once for each tuple of RR: M+∣R∣NM + |R| N page reads. The block nested-loop join loads B−2B - 2 pages of RR at a time and scans SS once per block: M+⌈M/(B−2)⌉NM + \lceil M/(B-2) \rceil N. The index nested-loop join searches an index on SS’s join column for each tuple of RR: M+∣R∣(h+1)M + |R|(h + 1) for an index of height hh and one matching tuple. The sort–merge join sorts both inputs on the join column and merges them: the two sorts plus M+NM + N. The hash join builds a hash table on the smaller input and probes it with the other: M+NM + N if the smaller fits in B−2B - 2 pages; otherwise the Grace variant first partitions both inputs into B−1B - 1 buckets on disk by a hash of the join column and joins bucket by bucket: 3(M+N)3(M + N).

Counted page I/O of four joins as R grows from 100 to 1,000 pages, S fixed at 100 pages, 12 buffer pages. The tuple nested loop is off the chart: 100,100 already at M = 100.
Counted page I/O of four joins as RR grows from 100 to 1,000 pages, SS fixed at 100 pages, 12 buffer pages. The tuple nested loop is off the chart: 100,100 already at M=100M = 100.
अध्याय में पढ़ें →