Automatic indexing of columns

Are SERIAL columns in YugaByte YSQL automatically indexed? Or, it is indexed only when the column is explicitly marked with a PRIMARY KEY or UNIQUE constraint?

SERIAL columns are not automatically indexed in YSQL. If you desire to have them indexed, either use a PRIMARY KEY or UNIQUE constraint or create a secondary index on the column explicitly.

Hope this helps.

1 Like