Întrebare
How can I create an index on a timestamp column in MySQL?
Întrebare a fost pusă de: USER6312
57 Vezi
57 Răspunsuri
Răspuns (57)
You can create an index on a timestamp column using the `CREATE INDEX` statement or by adding it to the table definition during creation or alteration. For example:
`CREATE INDEX idx_created_at ON your_table (created_at);`
Alternatively, when altering the table:
`ALTER TABLE your_table ADD INDEX idx_created_at (created_at);`