Let's say I have a table with 10 billion rows. Each row has a datetime column to signify when the row was added to the table. When querying against this table, 99% of the time the query will be based on a date range. Now my question:
Would it be faster to query based on the date time (e.g. where date between), or to query based on a range of the primary key (rowid)? In the second case I could have a table containing ID range values for each date so it would be simple to know what ID range to query for. Regardless of the implementation, would a primary key query like this be faster than the date range query? And if so, would it be significantly faster/take significantly less resources?
Thanks for any help. I'll be running some tests myself as well, just want to get some outside feedback on the matter to avoid confirmation bias.