I have the following table with roughly 400 million rows. I have to perform SELECT
queries on this table, generally involving WHERE
clause on Date_create
column.
The key is that most of my queries are on full days (not taking into account hours and seconds)
+----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+-------+
| ID_num | bigint(45) | NO | PRI | NULL | |
| Content | varchar(250) | YES | | NULL | |
| User_ID | bigint(24) | NO | MUL | NULL | |
| Location | varchar(70) | YES | | NULL | |
| Date_create | datetime | NO | | NULL | |
+----------------+--------------+------+-----+---------+-------+
Would there be a significant increase in performance in:
- Creating a new column
Day_create
which would be ofDATE
type, (not DATETIME) and having an index on this column.
As opposed to:
- Having an index on the
Date_create
column of typeDATETIME
.