I'm well aware that an index is automatically created with a primary key. Nevertheless what about multi column primary key ?
Lets say i have this table :
CREATE TABLE mytable(
created_at TEXT NOT NULL,
uuid TEXT NOT NULL,
val INTEGER NOT NULL,
PRIMARY KEY(created_at, uuid));
Querying like this
SELECT * FROM mytable WHERE created_at > '2018-01-01' AND uuid = 'abc'
will use the primary key index.
But what if i only search on uuid for instance?
SELECT * FROM mytable WHERE uuid = 'abc'
Should i recreate an index on the uuid column alone or the primary index will just works fine ?