yes why do I need to index other columns?
If the primary key is defined why you want to index a primary key? Index other columns but not Primary Key
I'm asking if primary keys are not automatically indexed
As a long as Primary key has been defined by you or automatically then its not necessary to index it.
Normally yes (I didn't check every dbms), so if you lookup by PK is fast. If you need to access the data by other patterns (ex filtering by "status" and "event_type" and "event_date" in an hypotetical event table) it's a good practice to index also these data, according to your specific patterns
Thanks. I understand you.
Обсуждают сегодня