Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardSQLindex-only scansSingle-choice MCQ

You create a covering index in PostgreSQL using INCLUDE to add a payload column: CREATE INDEX ON t (a) INCLUDE (b). A query SELECT b FROM t WHERE a = 5 AND b > 100 is run. Regarding the INCLUDE column b, which statement about how the index is used is correct?

CREATE INDEX ix ON t (a) INCLUDE (b); SELECT b FROM t WHERE a = 5 AND b > 100;