下面的SQL哪些有可能经过两个阶段(只经过一次shuffle)就计算出结果:( )
A: SELECT key1, key2, SUM(value1) FROM (SELECT key1, key2, COUNT(*) FROM dual GROUP BY key1, key2) t1 GROUP BY key2, key1;
B: SELECT a.key1, a.key2 FROM table1 a JOIN table2 b ON a.key1 = b.key;
C: SELECT *, ROW_NUMBER() OVER(PARTITION BY key ORDER BY value1, value 2) id1, ROW_NUMBER() OVER(PARTITION BY key ORDER BY value1) id2 FROM dual;
A: SELECT key1, key2, SUM(value1) FROM (SELECT key1, key2, COUNT(*) FROM dual GROUP BY key1, key2) t1 GROUP BY key2, key1;
B: SELECT a.key1, a.key2 FROM table1 a JOIN table2 b ON a.key1 = b.key;
C: SELECT *, ROW_NUMBER() OVER(PARTITION BY key ORDER BY value1, value 2) id1, ROW_NUMBER() OVER(PARTITION BY key ORDER BY value1) id2 FROM dual;
举一反三
- 如果有H(key)=key mod 13,若:key1=12,key2=25,那么key1与key2是同义词。
- How many key comparisons are needed in searching for key value 38() A: 1 B: 2 C: 3 D: 4
- Four keys to getting hired are begun in different ways stylistically. Key 1 starts with a ____.Key 2 starts with a ___. Key 3 starts with a ____. Key4 starts with a ____.
- 关键码key实际存放的位置是: A: key B: key - 1 C: hash(key) D: hash(hash(key))
- HashMap中的put()方法参数是() A: put(value,key) B: put(key,key) C: put(key,value) D: put(key,key)