If you have a very very large database, is it fast to search for a certain timestamp interval on a timestamp field?
Would it make sense to create tables with intervals where you can log all the IDs of things on the main table that were done on certain timeframes (like a day each)… and then you could search on these tables say like 2 days and it would give you all the IDs of the things on the main tables with timestamps within those periods… and then just pull those from the main table?
Does this make any sense at all?
That doesn’t make much sense. If you create an index on the timestamp field, most database will create a B+tree index which is a multi-level structure. If you have a large table but want to search only in a small range, it will actually search only in the necessary parts of the index so it’s very efficient.