1831
GB
What is the driving table concept in nested loop join execution and how does the optimizer choose it?
IN
नेस्टेड लूप जॉइन निष्पादन में ड्राइविंग टेबल अवधारणा क्या है और ऑप्टिमाइज़र इसे कैसे चुनता है?
A
The driving table is always the first table listed in the FROM clause
ड्राइविंग टेबल हमेशा FROM क्लॉज में सूचीबद्ध पहली टेबल होती है
B
In a nested loop join the driving table (outer loop) is the table whose rows are iterated one by one with the inner table looked up for each outer row; the optimizer chooses the smaller or more filtered table as the driving table to minimize iterations; an index on the inner table's join column is critical
एक नेस्टेड लूप में ड्राइविंग टेबल से जुड़ें (बाहरी लूप) वह तालिका है जिसकी पंक्तियों को एक-एक करके दोहराया जाता है और प्रत्येक बाहरी पंक्ति के लिए आंतरिक तालिका देखी जाती है; ऑप्टिमाइज़र पुनरावृत्तियों को कम करने के लिए ड्राइविंग टेबल के रूप में छोटी या अधिक फ़िल्टर की गई तालिका को चुनता है; आंतरिक टेबल के जॉइन कॉलम पर एक इंडेक्स महत्वपूर्ण है
C
The table that drives the query plan in all join types always
वह तालिका जो सभी प्रकार के जॉइन में हमेशा क्वेरी प्लान चलाती है
D
The driving table is always the larger table for maximum efficiency
अधिकतम दक्षता के लिए ड्राइविंग टेबल हमेशा बड़ी टेबल होती है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
Driving table selection: optimizer estimates rows returned by each table after applying WHERE filter, chooses smaller filtered result as outer (driving) table, verifies inner table has suitable index. Example: orders(10M rows) JOIN customers(100K rows) WHERE orders.date=2024 (returns 10K orders): driving=filtered orders(10K), inner=customers with index on id. If no index on customers.id: optimizer may switch to hash join.
व्याख्या (हिन्दी)
ड्राइविंग टेबल चयन: ऑप्टिमाइज़र WHERE फ़िल्टर लागू करने के बाद प्रत्येक तालिका द्वारा लौटाई गई पंक्तियों का अनुमान लगाता है, बाहरी (ड्राइविंग) तालिका के रूप में छोटे फ़िल्टर किए गए परिणाम को चुनता है, सत्यापित करता है कि आंतरिक तालिका में उपयुक्त सूचकांक है। उदाहरण: ऑर्डर (10M पंक्तियाँ) ग्राहकों से जुड़ें (100K पंक्तियाँ) जहाँ ऑर्डर.डेट = 2024 (10K ऑर्डर लौटाता है): ड्राइविंग = फ़िल्टर किए गए ऑर्डर (10K), आंतरिक = आईडी पर इंडेक्स वाले ग्राहक। यदि customer.id पर कोई इंडेक्स नहीं है: ऑप्टिमाइज़र हैश जॉइन पर स्विच कर सकता है।