CS FundamentalsVery hardGATE CS (PYQ pattern)
Under snapshot isolation item X has committed versions (commit timestamp: value): 0: 10, 5: 20, 9: 30, 14: 40. A transaction reads the latest version with commit timestamp <= its start timestamp. Five read-only transactions start at timestamps 4, 6, 9, 12 and 15. What is the sum of the values they read?
- A. 130
- B. 120
- C. 140
- D. 150
Correct answer: A. 130
Start 4 sees 10, 6 sees 20, 9 sees 30 (commit timestamp 9 <= 9 is visible), 12 sees 30, 15 sees 40: [10, 20, 30, 30, 40].
More DBMS and SQL questions
- T1: R1(X), W1(Y); T2: W2(X), W2(Y); T3: W3(X), W3(Y), R3(Y). Of all 210 interleavings, how many are view-serializable and how many are…
- TS(T1) < TS(T2) < TS(T3). T1: W1(A), R1(B); T2: R2(A), W2(B); T3: W3(A), W3(B). Of all 90 interleavings, how many complete with NO abort…
- Multiversion timestamp ordering with TS(T1) < TS(T2) < TS(T3): a read of X returns the version with the largest write timestamp <= TS(T)…
- An equi-width histogram on column A (range 0 to 100, 10,000 rows) has buckets [0,20): 4000, [20,40): 2500, [40,60): 1500, [60,80): 1500…
- Relations R (1000 tuples), S (2000), T (500). Join selectivities: R–S 0.001, S–T 0.01, R–T 0.0005 (fraction of the cross product that…
- Sort-merge join of R (1000 pages) and S (400 pages) with 20 buffer pages. Each relation is fully sorted by external merge sort (pass 0…