Bird
0
0

You want to analyze only the columns price and quantity in the sales table to speed up statistics collection. Which command achieves this?

hard📝 Application Q8 of 15
PostgreSQL - Performance Tuning
You want to analyze only the columns price and quantity in the sales table to speed up statistics collection. Which command achieves this?
AANALYZE sales ONLY price, quantity;
BANALYZE sales WHERE column IN ('price', 'quantity');
CANALYZE sales(price, quantity);
DANALYZE sales COLUMNS price, quantity;
Step-by-Step Solution
Solution:
  1. Step 1: Recall syntax for analyzing specific columns

    PostgreSQL allows ANALYZE tablename(column1, column2) to analyze specific columns.
  2. Step 2: Check other options

    Options A, B, C use invalid syntax or keywords not supported.
  3. Final Answer:

    ANALYZE sales(price, quantity); -> Option C
  4. Quick Check:

    ANALYZE with column list uses parentheses [OK]
Quick Trick: Use ANALYZE tablename(column1, column2) for specific columns [OK]
Common Mistakes:
  • Using WHERE clause with ANALYZE
  • Adding unsupported keywords like COLUMNS or ONLY
  • Incorrect parentheses usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes