Bird
0
0

Which of the following is the correct syntax to create a BRIN index on the column timestamp of a table named events?

easy📝 Syntax Q12 of 15
PostgreSQL - Indexing Strategies
Which of the following is the correct syntax to create a BRIN index on the column timestamp of a table named events?
ACREATE INDEX events_brin ON events USING BRIN (timestamp);
BCREATE BRIN INDEX ON events (timestamp);
CCREATE INDEX ON events USING BRIN timestamp;
DCREATE INDEX brin_events ON events USING BRIN timestamp;
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct CREATE INDEX syntax

    The syntax is: CREATE INDEX index_name ON table_name USING BRIN (column);
  2. Step 2: Check each option

    CREATE INDEX events_brin ON events USING BRIN (timestamp); matches the correct syntax with index name, table, method, and column in parentheses.
  3. Final Answer:

    CREATE INDEX events_brin ON events USING BRIN (timestamp); -> Option A
  4. Quick Check:

    CREATE INDEX name ON table USING BRIN (column) [OK]
Quick Trick: Always specify index name and use parentheses for columns [OK]
Common Mistakes:
  • Omitting index name
  • Missing parentheses around column
  • Wrong order of keywords

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes