1. Home
  2. All MCQs

All MCQs with Answers · Page 1345

43,842 multiple choice questions from every subject, newest first. Switch on practice mode to hide the answers and test yourself.

Newest first

Two transactions read the same row and then write it back. Which measure prevents the lost update?

  1. SELECT with FOR UPDATE, which holds a row lock until the transaction ends Correct answer
  2. Wrapping both reads in a statement with DISTINCT applied to it first
  3. Setting the session to READ UNCOMMITTED so that writers see each other work
  4. Adding an ORDER BY clause so the rows are processed in turn by each
MCQSEXAM Read explanation

SelectKBest is configured with score_func=chi2 and fitted on a design matrix that contains negative values. What happens?

  1. It raises an error, because chi-squared scoring needs non-negative features Correct answer
  2. It silently takes absolute values before computing the chi-squared scores
  3. It works but ranks the negative features last regardless of their true signal
  4. It standardises the features first, which makes every value non-negative
MCQSEXAM Read explanation