Indexing vs. no indexing when inserting records
- by jbu
I have a few questions about whether or not it would be best to not use indexing.
BACKGROUND:
My records have a timestamp attribute, and the records will be inserted in order of their timestamps (i.e., inserted chronologically).
QUESTIONS:
If I DON'T use indexing is it typical for the database to insert the records in the order that they were inserted?
If answer to #1 is yes, when I do a "SELECT .. WHERE timestamp X" type query will the database be efficient at it, or will it have to go through every single record since it isn't indexed? I would assume if there were no index, the database would not "know" that the records were inserted in sorted order and could not, therefore, make use of sorted property of the database.
I assume a clustered index would be best for these types of records & their inserts.
Please let me know what you guys think.
Thanks,
jbu