DB2 ⭐ Featured
👁 0

Q: How to tune DB2 queries?

Answer:
Check EXPLAIN output. Look at: access type (index vs scan), join method, sort operations. Add indexes for predicates. Rewrite with hints. Update statistics. Check for full tablespace scans. Monitor actual execution.
DB2 ⭐ Featured
👁 0

Q: What is OPTIMIZE FOR n ROWS?

Answer:
OPTIMIZE FOR n ROWS hints expected rows. SELECT * FROM t ORDER BY c OPTIMIZE FOR 1 ROW. Influences access path. Low n favors index. High n may favor scan. Use when you know actual row count.
VSAM ⭐ Featured
👁 0

Q: Explain MASSINSERT?

Answer:
MASSINSERT optimizes bulk sequential inserts. System defers CI splits. Better performance for loads. Implicit with REPRO. COBOL can hint with APPLY WRITE-ONLY style.
DB2
👁 0

Q: What is VOLATILE table?

Answer:
VOLATILE TABLE hints optimizer to expect different row counts. Useful for varying cardinality. CREATE TABLE ... VOLATILE CARDINALITY. Or ALTER TABLE ... VOLATILE. Helps when statistics mislead optimizer.