Timestamp data type / indexing and seacrhing
Posted by: Jeffrey Jennings
Date: October 22, 2014 03:01AM

for years I have used NOW() and an interger of length 10 for my timestamp fields, but I see now there is a timestamp datatype that inserts data in date and time format that appears to be accurate to the second.

my question is this. I'll soon be creating a few tables that will each have on an ongoing basis about 500k to 600k rows and one of the indexed fields will be timestamp.

I only need accuracy to the second (not any fraction of a second) because I'll be doing lots of search on the tables for all records that have been added in the last 24 hours (counts, averaging of fields in those records, etc) and my question is this.

will it be faster to perform a query on the date field for all rows added in the prior 24 hours if I use the timestamp data tpe or if I have unix time in a 10 byte integer field.

speed of query results in highly important to be so now that I'm in the planning phase for the table fields I want to choose the option that works best from a query speed standpoint.

thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
Timestamp data type / indexing and seacrhing
October 22, 2014 03:01AM


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.