Complete the code to create a BRIN index on the column 'event_time' in the 'logs' table.
CREATE INDEX brin_event_time_idx ON logs USING [1] (event_time);The BRIN index type is specified by the keyword brin. It is suitable for large tables with sequential data.
Complete the code to create a BRIN index with a pages_per_range of 128 on the 'event_time' column.
CREATE INDEX brin_event_time_idx ON logs USING brin (event_time) WITH (pages_per_range = [1]);The pages_per_range parameter controls how many pages each BRIN range covers. Setting it to 128 is common for large tables.
Fix the error in the code to create a BRIN index on 'event_time' with the correct syntax for options.
CREATE INDEX brin_event_time_idx ON logs USING brin (event_time) WITH ([1] = 128);
The correct option name is pages_per_range (plural 'pages').
Fill both blanks to create a BRIN index on 'event_time' with autosummarize disabled.
CREATE INDEX brin_event_time_idx ON logs USING [1] (event_time) WITH (autosummarize = [2]);
The index type must be brin. Setting autosummarize to false disables automatic summary updates.
Fill all three blanks to create a BRIN index on 'event_time' with pages_per_range 64 and autosummarize enabled.
CREATE INDEX brin_event_time_idx ON logs USING [1] (event_time) WITH (pages_per_range = [2], autosummarize = [3]);
The index type is brin. The pages_per_range is set to 64, and autosummarize is enabled with true.