DBMS — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye

📚 2982 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
2982 questions
2131
EN + हिं Easy
GB What is the INSERT ALL statement in Oracle SQL and what problem does it solve?
IN Oracle SQL में INSERT ALL स्टेटमेंट क्या है और यह किस समस्या का समाधान करता है?
A
Inserting all rows from one table to another सभी पंक्तियों को एक तालिका से दूसरी तालिका में सम्मिलित करना
B
Oracle-specific SQL that inserts multiple rows into multiple tables in a single statement (unconditional or conditional INSERT ALL INTO t1...INTO t2...) solving the problem of making multiple table inserts atomic and efficient from a single data scan ओरेकल-विशिष्ट एसक्यूएल जो एक ही स्टेटमेंट में कई पंक्तियों को कई तालिकाओं में सम्मिलित करता है (बिना शर्त या सशर्त INSERT ALL INTO t1...INTO t2...) एकल डेटा स्कैन से एकाधिक तालिका आवेषण को परमाणु और कुशल बनाने की समस्या को हल करता है
C
Inserting all columns from a single row एक ही पंक्ति से सभी कॉलम सम्मिलित करना
D
Inserting the same row into multiple copies of a table किसी तालिका की एकाधिक प्रतियों में एक ही पंक्ति सम्मिलित करना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Oracle INSERT ALL: INSERT ALL INTO t1 (col) VALUES (val1) INTO t2 (col) VALUES (val2) SELECT 1 FROM DUAL; Or conditional: INSERT ALL WHEN id < 100 THEN INTO small_orders WHEN id >= 100 THEN INTO large_orders SELECT id, amount FROM staged_orders. Performs multiple inserts in single pass over source data, all in one atomic statement.
व्याख्या (हिन्दी) Oracle सभी सम्मिलित करें: सभी को t1 (col) मानों (val1) में t2 (col) मानों (val2) में सम्मिलित करें, दोहरे में से 1 चुनें; या सशर्त: आईडी <100 होने पर सभी को छोटे ऑर्डर में डालें, जब आईडी >= 100 हो तो बड़े ऑर्डर में डालें, चरणबद्ध ऑर्डर से आईडी, राशि चुनें। स्रोत डेटा पर एकल पास में एकाधिक प्रविष्टियाँ निष्पादित करता है, सभी एक परमाणु कथन में।
2132
EN + हिं Medium
GB What is the performance difference between NESTED LOOP JOIN HASH JOIN and SORT-MERGE JOIN?
IN नेस्टेड लूप जॉइन हैश जॉइन और सॉर्ट-मर्ज जॉइन के बीच प्रदर्शन में क्या अंतर है?
A
Nested Loop: O(n*m) good for small tables/indexed access; Hash Join: O(n+m) good for large unindexed tables (requires memory for hash table); Sort-Merge: O(n log n + m log m) good when inputs are already sorted नेस्टेड लूप: O(n*m) छोटी तालिकाओं/अनुक्रमित पहुंच के लिए अच्छा है; हैश जॉइन: O(n+m) बड़ी अनइंडेक्स्ड तालिकाओं के लिए अच्छा है (हैश तालिका के लिए मेमोरी की आवश्यकता होती है); सॉर्ट-मर्ज: O(n log n + m log m) अच्छा है जब इनपुट पहले से ही सॉर्ट किए गए हों
B
They are equally performant in all scenarios वे सभी परिदृश्यों में समान रूप से प्रदर्शन करते हैं
C
Nested Loop is always fastest नेस्टेड लूप हमेशा सबसे तेज़ होता है
D
Hash Join is always fastest हैश जॉइन हमेशा सबसे तेज़ होता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Nested Loop: for each outer row, scan inner (use index). Best: small inner or indexed. Hash Join: build hash table on smaller table, probe with larger. Best: large unindexed tables. Sort-Merge: sort both, merge. Best: already-sorted inputs or when sort is needed anyway.
व्याख्या (हिन्दी) नेस्टेड लूप: प्रत्येक बाहरी पंक्ति के लिए, आंतरिक को स्कैन करें (इंडेक्स का उपयोग करें)। सर्वोत्तम: छोटा भीतरी या अनुक्रमित। हैश जॉइन: छोटी टेबल पर हैश टेबल बनाएं, बड़ी टेबल के साथ जांच करें। सर्वोत्तम: बड़ी अनअनुक्रमित तालिकाएँ। सॉर्ट-मर्ज: दोनों को सॉर्ट करें, मर्ज करें। सर्वोत्तम: पहले से ही क्रमबद्ध इनपुट या जब भी सॉर्ट की आवश्यकता हो।
2133
EN + हिं Easy
GB In SQL what does a FULL OUTER JOIN return?
IN एसक्यूएल में फुल आउटर जॉइन क्या लौटाता है?
A
Only matching rows from both tables दोनों तालिकाओं से केवल मेल खाने वाली पंक्तियाँ
B
All rows from BOTH tables with NULLs for non-matching sides: rows matched on both sides (complete data) unmatched rows from left table (right side NULL) and unmatched rows from right table (left side NULL) गैर-मिलान पक्षों के लिए NULL के साथ दोनों तालिकाओं की सभी पंक्तियाँ: दोनों तरफ मिलान वाली पंक्तियाँ (पूर्ण डेटा), बाईं तालिका से बेजोड़ पंक्तियाँ (दाईं ओर NULL) और दाईं तालिका से बेजोड़ पंक्तियाँ (बाईं ओर NULL)
C
All rows from the left table only सभी पंक्तियाँ केवल बाईं तालिका से
D
All rows from neither table (only NULLs) किसी भी तालिका से सभी पंक्तियाँ (केवल शून्य)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) FULL OUTER JOIN = LEFT OUTER JOIN UNION RIGHT OUTER JOIN. Result: (1) Rows matching join condition from both tables, (2) Left-only rows with NULL right columns, (3) Right-only rows with NULL left columns. Useful for: finding unmatched records in either table.
व्याख्या (हिन्दी) पूर्ण बाहरी जोड़ = बायां बाहरी जोड़ दायां बाहरी जोड़। परिणाम: (1) दोनों तालिकाओं से जुड़ने की स्थिति से मेल खाने वाली पंक्तियाँ, (2) केवल बाएँ पंक्तियाँ शून्य दाएँ स्तंभों के साथ, (3) केवल दाएँ पंक्तियाँ शून्य बाएँ स्तंभों के साथ। इसके लिए उपयोगी: किसी भी तालिका में बेजोड़ रिकॉर्ड ढूंढना।
2134
EN + हिं Medium
GB What is the anti-join pattern and how is it implemented in SQL?
IN एंटी-जॉइन पैटर्न क्या है और इसे SQL में कैसे लागू किया जाता है?
A
A query pattern that returns rows from the left table that have NO matching rows in the right table implemented as: LEFT JOIN WHERE right.key IS NULL or NOT EXISTS (subquery) or NOT IN (subquery) एक क्वेरी पैटर्न जो बाईं तालिका से पंक्तियाँ लौटाता है, जिसमें दाहिनी तालिका में कोई मेल खाने वाली पंक्तियाँ नहीं हैं, इस प्रकार कार्यान्वित किया गया है: बाएँ शामिल हों जहाँ दाएँ.कुंजी शून्य है या मौजूद नहीं है (सबक्वेरी) या अंदर नहीं है (सबक्वेरी)
B
An outer join applied to all tables simultaneously एक बाहरी जोड़ सभी तालिकाओं पर एक साथ लागू होता है
C
A join that uses NOT EQUAL as the join condition एक जुड़ाव जो जुड़ने की शर्त के रूप में NOT EQUAL का उपयोग करता है
D
A join that reverses the join condition एक जुड़ाव जो जुड़ने की स्थिति को उलट देता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Anti-join: find customers with NO orders. Method 1: SELECT c.* FROM customer c LEFT JOIN order o ON c.id=o.cust_id WHERE o.cust_id IS NULL. Method 2: NOT EXISTS subquery. Method 3: NOT IN (subquery). Performance: LEFT JOIN+NULL check or NOT EXISTS usually preferred over NOT IN when NULLs may exist.
व्याख्या (हिन्दी) एंटी-जॉइन: बिना ऑर्डर वाले ग्राहक ढूंढें। विधि 1: ग्राहक से c.* चुनें c.id=o.cust_id पर शामिल होने का आदेश छोड़ दें जहां o.cust_id शून्य है। विधि 2: सबक्वेरी मौजूद नहीं है। विधि 3: नॉट इन (सबक्वेरी)। प्रदर्शन: लेफ्ट जॉइन+न्यूल चेक या NOT EXISTS को आम तौर पर NOT IN की तुलना में प्राथमिकता दी जाती है जब NULL मौजूद हो।
2135
EN + हिं Easy
GB What is a join condition pushed down optimization and why does the optimizer do it?
IN जॉइन कंडीशन पुश डाउन ऑप्टिमाइज़ेशन क्या है और ऑप्टिमाइज़र ऐसा क्यों करता है?
A
Moving join conditions from ON to WHERE clause जुड़ने की शर्तों को ON से WHERE क्लॉज पर ले जाना
B
The query optimizer moves filtering conditions (predicates) as early as possible in the execution plan - before joining - to reduce the number of rows that need to be joined dramatically reducing the join cost क्वेरी ऑप्टिमाइज़र निष्पादन योजना में जितनी जल्दी हो सके फ़िल्टरिंग स्थितियों (विधेय) को स्थानांतरित करता है - शामिल होने से पहले - उन पंक्तियों की संख्या को कम करने के लिए जिन्हें नाटकीय रूप से शामिल करने की लागत को कम करने की आवश्यकता होती है।
C
Pushing join conditions from SQL to the application layer SQL से एप्लिकेशन लेयर पर जुड़ने की शर्तों को पुश करना
D
Moving join conditions from WHERE to HAVING जुड़ने की स्थिति को WHERE से HAVING की ओर ले जाना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Predicate pushdown: instead of joining 1M rows then filtering, filter first (e.g., WHERE status=active) reducing to 10K rows, then join those. The optimizer rewrites the logical plan to apply filters before joins. Critical for performance, especially in distributed/columnar databases.
व्याख्या (हिन्दी) पुशडाउन की भविष्यवाणी करें: 1M पंक्तियों को जोड़ने और फिर फ़िल्टर करने के बजाय, पहले फ़िल्टर करें (उदाहरण के लिए, WHERE स्थिति=सक्रिय) 10K पंक्तियों तक कम करें, फिर उनमें शामिल हों। ऑप्टिमाइज़र जुड़ने से पहले फ़िल्टर लागू करने की तार्किक योजना को फिर से लिखता है। प्रदर्शन के लिए महत्वपूर्ण, विशेष रूप से वितरित/स्तंभकार डेटाबेस में।
2136
EN + हिं Medium
GB What causes a Cartesian product to accidentally occur in SQL and how is it detected?
IN SQL में कार्टेशियन उत्पाद के आकस्मिक रूप से उत्पन्न होने का क्या कारण है और इसका पता कैसे लगाया जाता है?
A
Using a FROM clause with multiple tables without specifying join conditions or using CROSS JOIN - detected by the absence of WHERE/ON conditions between tables and the result set size = product of table sizes जुड़ने की शर्तों को निर्दिष्ट किए बिना या क्रॉस जॉइन का उपयोग किए बिना कई तालिकाओं के साथ FROM क्लॉज का उपयोग करना - तालिकाओं और परिणाम सेट आकार के बीच WHERE/ON शर्तों की अनुपस्थिति से पता लगाया गया = तालिका आकार का उत्पाद
B
Using aggregate functions on joined tables सम्मिलित तालिकाओं पर समग्र कार्यों का उपयोग करना
C
Using INNER JOIN without ON clause ON क्लॉज के बिना INNER JOIN का उपयोग करना
D
Using outer joins incorrectly बाहरी जोड़ का गलत तरीके से उपयोग करना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Accidental Cartesian: SELECT * FROM orders, customers (missing WHERE orders.cust_id=customers.id) produces orders times customers rows. Detected by: result row count = n times m (massive), EXPLAIN shows CROSS JOIN or no join condition. Always verify FROM clause joins when using comma-separated table list.
व्याख्या (हिन्दी) आकस्मिक कार्टेशियन: ऑर्डर से चुनें *, ग्राहक (जहां ऑर्डर.cust_id=customers.id गायब है) ग्राहकों की पंक्तियों से गुणा ऑर्डर उत्पन्न करता है। द्वारा पता लगाया गया: परिणाम पंक्ति गणना = n गुना m (विशाल), EXPLAIN क्रॉस जॉइन या कोई जॉइन स्थिति नहीं दिखाता है। अल्पविराम से अलग की गई तालिका सूची का उपयोग करते समय हमेशा FROM क्लॉज जॉइन को सत्यापित करें।
2137
EN + हिं Easy
GB What is a non-equi join (theta join with non-equality condition) and give a practical example?
IN नॉन-इक्विटी जॉइन (थीटा जॉइन विद नॉन-इक्वलिटी कंडीशन) क्या है और एक व्यावहारिक उदाहरण दें?
A
A join using comparison operators other than equality (>, <, >=, <=, BETWEEN, LIKE) in the join condition - e.g. joining employee salary to a salary_grade table where salary BETWEEN grade_low AND grade_high समानता के अलावा अन्य तुलना ऑपरेटरों का उपयोग करते हुए एक जुड़ाव (>, =,
B
A join that returns NULL values only एक जुड़ाव जो केवल NULL मान लौटाता है
C
A join that does not work correctly ऐसा जुड़ाव जो ठीक से काम नहीं करता
D
A join between tables with different schemas विभिन्न स्कीमा वाली तालिकाओं के बीच एक जुड़ाव
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Non-equi join: SELECT e.name, g.grade FROM employee e JOIN salary_grade g ON e.salary BETWEEN g.low AND g.high. Other examples: self join for triangular queries, joining date ranges, finding records within a distance threshold. Cannot use hash join (hash works only with equi-conditions).
व्याख्या (हिन्दी) नॉन-इक्वी जॉइन: कर्मचारी से ई.नाम, जी.ग्रेड चुनें और जी.कम और जी.उच्च के बीच ई.वेतन पर वेतन_ग्रेड जी में शामिल हों। अन्य उदाहरण: त्रिकोणीय प्रश्नों के लिए स्वयं शामिल होना, दिनांक सीमाओं को जोड़ना, दूरी सीमा के भीतर रिकॉर्ड ढूंढना। हैश जॉइन का उपयोग नहीं किया जा सकता (हैश केवल सम-स्थितियों के साथ काम करता है)।
2138
EN + हिं Easy
GB What is the lateral join (or CROSS JOIN LATERAL) in SQL and what problem does it solve?
IN SQL में लेटरल जॉइन (या CROSS JOIN LATERAL) क्या है और यह किस समस्या का समाधान करता है?
A
A join between geographically distributed databases भौगोलिक रूप से वितरित डेटाबेस के बीच एक जुड़ाव
B
A join that only works with parallel query execution एक जुड़ाव जो केवल समानांतर क्वेरी निष्पादन के साथ काम करता है
C
A join that works sideways (column to column) एक जोड़ जो बग़ल में काम करता है (कॉलम से कॉलम)
D
A join where the right side (subquery or function) can reference columns from tables to its left in the FROM clause - allowing correlation within the FROM clause useful for top-N per group queries एक जुड़ाव जहां दाईं ओर (सबक्वेरी या फ़ंक्शन) FROM क्लॉज में तालिकाओं से बाईं ओर के कॉलम को संदर्भित कर सकता है - FROM क्लॉज के भीतर सहसंबंध की अनुमति देता है जो प्रति समूह प्रश्नों के लिए शीर्ष-एन के लिए उपयोगी है।
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) LATERAL: SELECT c.id, top_orders.* FROM customers c JOIN LATERAL (SELECT * FROM orders WHERE cust_id=c.id ORDER BY total DESC LIMIT 3) AS top_orders ON true. References c.id from outer FROM. Solves: top-N per group, unnesting arrays, calling row-returning functions with per-row arguments.
व्याख्या (हिन्दी) लेटरल: सी.आईडी, टॉप_ऑर्डर का चयन करें। * ग्राहकों से सी जॉइन लैटरल (चुनें * उन ऑर्डरों से जहां cust_id=c.id ऑर्डर कुल DESC सीमा 3 के अनुसार) टॉप_ऑर्डर के रूप में सत्य पर। बाहरी FROM से संदर्भ c.id. समाधान: प्रति समूह टॉप-एन, अननेस्टिंग ऐरे, प्रति-पंक्ति तर्कों के साथ पंक्ति-रिटर्निंग फ़ंक्शन को कॉल करना।
2139
EN + हिं Easy
GB What is the join order problem in query optimization and why does it matter for performance?
IN क्वेरी ऑप्टिमाइज़ेशन में जॉइन ऑर्डर समस्या क्या है और यह प्रदर्शन के लिए क्यों मायने रखती है?
A
The order in which columns are listed in ON clause वह क्रम जिसमें कॉलम ON क्लॉज में सूचीबद्ध हैं
B
The order of joins in different user queries विभिन्न उपयोगकर्ता प्रश्नों में जुड़ने का क्रम
C
The alphabetical order of table names in FROM clause FROM खंड में तालिका नामों का वर्णमाला क्रम
D
The optimal sequence in which to join multiple tables; join order is critical because different orders produce dramatically different intermediate result set sizes and the optimizer must find the order minimizing total data processed एकाधिक तालिकाओं को जोड़ने का इष्टतम क्रम; जॉइन ऑर्डर महत्वपूर्ण है क्योंकि अलग-अलग ऑर्डर नाटकीय रूप से अलग-अलग मध्यवर्ती परिणाम सेट आकार उत्पन्न करते हैं और ऑप्टिमाइज़र को संसाधित किए गए कुल डेटा को कम करने वाला ऑर्डर ढूंढना होगा
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Join order optimization: with n tables, there are n!/2 possible join orders. A bad order (joining two large tables first) creates huge intermediates. Optimal order (smallest results first) minimizes I/O. Optimizers use dynamic programming or heuristics (join smaller tables first, use indexed joins first).
व्याख्या (हिन्दी) ज्वाइन ऑर्डर ऑप्टिमाइज़ेशन: n तालिकाओं के साथ, n!/2 संभावित ज्वाइन ऑर्डर हैं। एक ख़राब क्रम (पहले दो बड़ी तालिकाओं को जोड़ना) विशाल मध्यवर्ती बनाता है। इष्टतम क्रम (सबसे छोटे परिणाम पहले) I/O को न्यूनतम करता है। ऑप्टिमाइज़र डायनेमिक प्रोग्रामिंग या ह्यूरिस्टिक्स का उपयोग करते हैं (पहले छोटी तालिकाओं में शामिल हों, पहले अनुक्रमित जॉइन का उपयोग करें)।
2140
EN + हिं Medium
GB What is the difference between ON and USING clauses in JOIN syntax?
IN JOIN सिंटैक्स में ON और USING क्लॉज के बीच क्या अंतर है?
A
USING is for outer joins; ON is for inner joins USING बाहरी जुड़ावों के लिए है; ON आंतरिक जुड़ाव के लिए है
B
ON: allows any join condition including different column names (ON a.dept_id = b.id); USING: shorthand for equality join on same-named columns in both tables (USING(dept_id)) - eliminates duplicate columns in result चालू: विभिन्न कॉलम नामों सहित किसी भी जुड़ने की स्थिति की अनुमति देता है (ON a.dept_id = b.id); उपयोग करना: समानता के लिए आशुलिपि दोनों तालिकाओं में समान-नाम वाले कॉलमों को जोड़ती है (USING(dept_id)) - परिणाम में डुप्लिकेट कॉलम को समाप्त करता है
C
USING works with non-equality conditions; ON does not USING गैर-समानता स्थितियों के साथ काम करता है; चालू नहीं है
D
They produce different results वे भिन्न-भिन्न परिणाम उत्पन्न करते हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) ON: flexible, any condition, explicit, allows different column names, both columns appear in SELECT *. USING(col): implicit equality on same-named column, result has only one copy of that column in SELECT *. NATURAL JOIN: automatic USING on all common columns (risky if schema changes).
व्याख्या (हिन्दी) चालू: लचीला, कोई भी शर्त, स्पष्ट, अलग-अलग कॉलम नामों की अनुमति देता है, दोनों कॉलम SELECT * में दिखाई देते हैं। उपयोग (कॉल): समान नाम वाले कॉलम पर अंतर्निहित समानता, परिणाम में SELECT * में उस कॉलम की केवल एक प्रति है। प्राकृतिक जुड़ाव: सभी सामान्य स्तंभों पर स्वचालित उपयोग (यदि स्कीमा बदलता है तो जोखिम भरा)।
2141
EN + हिं Easy
GB What is semi-join reduction in distributed query optimization?
IN वितरित क्वेरी अनुकूलन में सेमी-ज्वाइन रिडक्शन क्या है?
A
Semi-join as a replacement for anti-join एंटी-जॉइन के प्रतिस्थापन के रूप में सेमी-जॉइन
B
Using semi-joins to reduce data transferred in distributed joins वितरित जॉइन में स्थानांतरित डेटा को कम करने के लिए सेमी-जॉइन का उपयोग करना
C
A technique to reduce the number of join conditions जुड़ने की स्थितियों की संख्या को कम करने की एक तकनीक
D
A technique to reduce data transfer in distributed joins: instead of shipping all of relation R to the site of relation S first compute the semi-join S semi-join R (much smaller) ship that to R site compute the join there - reduces network traffic डिस्ट्रीब्यूटेड जॉइन में डेटा ट्रांसफर को कम करने की एक तकनीक: सभी रिलेशन R को रिलेशन S की साइट पर भेजने के बजाय पहले सेमी-जॉइन S सेमी-जॉइन R (बहुत छोटा) शिप की गणना करें जिसे R साइट पर भेजें, वहां जॉइन की गणना करें - नेटवर्क ट्रैफ़िक को कम करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Distributed semi-join reduction: (1) At S site: project S onto join attributes -> Sj (small). (2) Ship Sj to R site. (3) At R site: filter R to only rows with matches (R semi-join Sj = Rr). (4) Ship Rr back to S site. (5) Compute final join. Effective when join attribute projection is much smaller than full relation.
व्याख्या (हिन्दी) वितरित सेमी-जॉइन रिडक्शन: (1) एस साइट पर: प्रोजेक्ट एस ऑन जॉइन एट्रिब्यूट्स -> एसजे (छोटा)। (2) एसजे को आर साइट पर शिप करें। (3) आर साइट पर: आर को केवल मिलान वाली पंक्तियों में फ़िल्टर करें (आर सेमी-जॉइन एसजे = आरआर)। (4) आरआर को एस साइट पर वापस भेजें। (5) अंतिम जुड़ाव की गणना करें। प्रभावी तब होता है जब सम्मिलित विशेषता प्रक्षेपण पूर्ण संबंध से बहुत छोटा होता है।
2142
EN + हिं Easy
GB What is the bushy join tree vs left-deep join tree distinction in query optimization?
IN क्वेरी अनुकूलन में झाड़ीदार जुड़ाव वृक्ष बनाम बाएँ-गहरे जुड़ाव वृक्ष के बीच क्या अंतर है?
A
Left-deep: each inner side of a join is a base table (chain structure: ((A join B) join C) join D) - allows pipelining but limited join orders; Bushy: inner sides can be intermediate results ((A join B) join (C join D)) - more join orders can exploit parallelism लेफ्ट-डीप: जॉइन का प्रत्येक आंतरिक पक्ष एक आधार तालिका है (श्रृंखला संरचना: ((ए जॉइन बी) जॉइन सी) जॉइन डी) - पाइपलाइनिंग की अनुमति देता है लेकिन सीमित जॉइन ऑर्डर; जंगली: आंतरिक पक्ष मध्यवर्ती परिणाम हो सकते हैं ((ए जुड़ते हैं बी) जुड़ते हैं (सी जुड़ते हैं डी)) - अधिक जुड़ने वाले आदेश समानता का फायदा उठा सकते हैं
B
A classification of table shapes not join orders तालिका आकृतियों का वर्गीकरण आदेशों में शामिल नहीं होता है
C
Bushy trees are less efficient than left-deep trees झाड़ीदार पेड़ बाएं-गहरे पेड़ों की तुलना में कम कुशल होते हैं
D
They are different names for the same join structure वे एक ही जुड़ाव संरचना के लिए अलग-अलग नाम हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Left-deep trees: enable pipeline execution (outer always a base table, inner always indexed - use nested-loop index join efficiently). Search space: O(n!). Bushy trees: allow any join order, enable parallel branches, larger search space O(2^n * n!). Most optimizers consider left-deep or zigzag trees for efficiency.
व्याख्या (हिन्दी) बाएं-गहरे पेड़: पाइपलाइन निष्पादन सक्षम करें (बाहरी हमेशा एक आधार तालिका, आंतरिक हमेशा अनुक्रमित - नेस्टेड-लूप इंडेक्स जॉइन का कुशलतापूर्वक उपयोग करें)। खोज स्थान: O(n!). जंगली पेड़: किसी भी जुड़ाव आदेश की अनुमति दें, समानांतर शाखाओं को सक्षम करें, बड़ा खोज स्थान O(2^n * n!)। अधिकांश अनुकूलक दक्षता के लिए बाएं-गहरे या टेढ़े-मेढ़े पेड़ों पर विचार करते हैं।
2143
EN + हिं Medium
GB What is join selectivity and how does it affect query optimization?
IN सम्मिलित चयनात्मकता क्या है और यह क्वेरी अनुकूलन को कैसे प्रभावित करती है?
A
The number of join conditions in a query किसी क्वेरी में शामिल होने की शर्तों की संख्या
B
The number of tables that can be joined simultaneously एक साथ जोड़ी जा सकने वाली तालिकाओं की संख्या
C
The speed of different join algorithms विभिन्न जॉइन एल्गोरिदम की गति
D
The fraction of rows in the cross product that actually match the join condition (result_rows / (|R| times |S|)); low selectivity (few matches) is better; optimizer uses statistics to estimate selectivity and choose between join methods क्रॉस उत्पाद में पंक्तियों का अंश जो वास्तव में जुड़ने की स्थिति से मेल खाता है (result_rows / (|R| बार |S|)); कम चयनात्मकता (कुछ मिलान) बेहतर है; ऑप्टिमाइज़र चयनात्मकता का अनुमान लगाने और जुड़ने के तरीकों के बीच चयन करने के लिए आंकड़ों का उपयोग करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Join selectivity = |R join S| / (|R| times |S|). Close to 0: few matches (selective), small result. Close to 1: most rows match (non-selective), large result. Estimated using column statistics (distinct values, histograms). Optimizer multiplies selectivities across predicates to estimate result size and choose join order/method.
व्याख्या (हिन्दी) चयनात्मकता से जुड़ें = |R, S से जुड़ें| / (|आर| गुना |एस|)। 0 के करीब: कुछ मिलान (चयनात्मक), छोटा परिणाम। 1 के करीब: अधिकांश पंक्तियाँ मेल खाती हैं (गैर-चयनात्मक), बड़ा परिणाम। स्तंभ आँकड़ों (विशिष्ट मान, हिस्टोग्राम) का उपयोग करके अनुमान लगाया गया। ऑप्टिमाइज़र परिणाम आकार का अनुमान लगाने और शामिल होने का क्रम/विधि चुनने के लिए विधेय में चयनात्मकता को गुणा करता है।
2144
EN + हिं Easy
GB What is the index nested loop join and what conditions make it efficient?
IN इंडेक्स नेस्टेड लूप जॉइन क्या है और कौन सी स्थितियाँ इसे कुशल बनाती हैं?
A
A join algorithm that processes loops in parallel एक जॉइन एल्गोरिदम जो लूप को समानांतर में संसाधित करता है
B
An index join that works only with primary keys एक इंडेक्स जॉइन जो केवल प्राथमिक कुंजी के साथ काम करता है
C
A nested loop join that creates indexes during execution एक नेस्टेड लूप जॉइन जो निष्पादन के दौरान इंडेक्स बनाता है
D
A join where for each row in the outer table the DBMS uses an index on the inner tables join key to directly look up matching rows - efficient when: outer table is small inner table has an appropriate index on the join column and join selectivity is low एक ऐसा जुड़ाव जहां बाहरी तालिका में प्रत्येक पंक्ति के लिए डीबीएमएस आंतरिक तालिकाओं पर एक इंडेक्स का उपयोग करता है, सीधे मेल खाने वाली पंक्तियों को देखने के लिए कुंजी जोड़ता है - कुशल जब: बाहरी तालिका छोटी होती है, आंतरिक तालिका में शामिल होने वाले कॉलम पर एक उपयुक्त सूचकांक होता है और जुड़ने की चयनात्मकता कम होती है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Index NL join: for each outer row -> index lookup on inner table (O(log n) or O(1) for hash index). Total cost: |outer| times (index lookup cost). Efficient when outer is small (few lookups needed) and inner has index. Much better than full inner scan per outer row.
व्याख्या (हिन्दी) इंडेक्स एनएल जॉइन: प्रत्येक बाहरी पंक्ति के लिए -> आंतरिक तालिका पर इंडेक्स लुकअप (हैश इंडेक्स के लिए ओ (लॉग एन) या ओ (1)। कुल लागत: |बाहरी| समय (सूचकांक लुकअप लागत)। जब बाहरी छोटा होता है (कुछ लुकअप की आवश्यकता होती है) और आंतरिक में सूचकांक होता है तो कुशल होता है। प्रति बाहरी पंक्ति के पूर्ण आंतरिक स्कैन से कहीं बेहतर।
2145
EN + हिं Easy
GB What is join elimination in query optimization?
IN क्वेरी ऑप्टिमाइज़ेशन में कनेक्ट एलिमिनेशन क्या है?
A
Removing joins that return no results उन जोड़ों को हटाना जिनसे कोई परिणाम नहीं मिलता
B
Removing unnecessary joins identified by the optimizer ऑप्टिमाइज़र द्वारा पहचाने गए अनावश्यक जोड़ों को हटाना
C
Eliminating one table from a join एक जॉइन से एक टेबल को हटाना
D
When the query optimizer removes a JOIN from the execution plan because it can prove the join does not affect the result (typically: joining to a unique FK parent table when only the child columns are selected) reducing unnecessary I/O जब क्वेरी ऑप्टिमाइज़र निष्पादन योजना से एक JOIN को हटा देता है क्योंकि यह साबित कर सकता है कि जुड़ाव परिणाम को प्रभावित नहीं करता है (आमतौर पर: जब केवल चाइल्ड कॉलम चुने जाते हैं तो एक अद्वितीय FK पैरेंट तालिका में शामिल होना) अनावश्यक I/O को कम करता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Join elimination: if you SELECT only columns from table A and JOIN table B on FK(A.b_id)=B.id where B.id is UNIQUE, and SELECT no B columns, the join is provably unnecessary (cannot filter A rows or produce duplicates). Optimizer removes the join to B entirely, reducing I/O dramatically.
व्याख्या (हिन्दी) उन्मूलन में शामिल हों: यदि आप तालिका ए से केवल कॉलम चुनते हैं और एफके (ए.बी_आईडी) = बी.आईडी पर तालिका बी में शामिल होते हैं जहां बी.आईडी अद्वितीय है, और कोई बी कॉलम नहीं चुनते हैं, तो जुड़ाव अनावश्यक साबित होता है (ए पंक्तियों को फ़िल्टर नहीं कर सकता या डुप्लिकेट उत्पन्न नहीं कर सकता)। ऑप्टिमाइज़र I/O को नाटकीय रूप से कम करते हुए, B से जुड़ाव को पूरी तरह से हटा देता है।
2131–2145 of 2982