Index on timestamp
Posted by:
Adeline M
Date: October 14, 2016 08:47AM
Hi
Is it a good idea to put an index in a timestamp column (created_at) ?
The table contains millions of rows and it will grow every minutes (~150K more rows per day)
This is my table ouv :
+---------------------+------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------------+------------------+------+-----+---------------------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| c_id | int(11) | NO | | NULL | |
| d_id | int(11) | NO | | NULL | |
| created_at | timestamp | NO | | 0000-00-00 00:00:00 | |
| updated_at | timestamp | NO | | 0000-00-00 00:00:00 | |
+---------------------+------------------+------+-----+---------------------+----------------+
My query is like :
SELECT d_id from ouv where created_at > '2016-07-13 00:00:00' and created_at < '2016-10-13 00:00:00'
Subject
Views
Written By
Posted
Index on timestamp
8115
October 14, 2016 08:47AM
3284
October 16, 2016 04:40PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.