
In this third course of the series, it’s time to move on from code to the 4D database and see how timestamps work in real-life conditions.
We’ll start by storing timestamps in table fields and concretely measure their footprint: data file size, index size, comparison with a classic structure using Date + Time pairs. Using generated datasets (100,000 records), we’ll demonstrate the gains in compactness and threshold effects associated with block storage.
We will then compare these structures with ORDA searches (using queryPlan) and sorting tests, to check that the theoretical advantages are confirmed in practice: fewer indexes, simpler query plans, and search and sorting performance in favor of timestamps.
Finally, we’ll look at how to use a timestamp to mark events (creation, modification, printing, etc.), moving on from a “few traceability fields in the main table” model to a truly structured event log. Timestamps then become the heart of a complete, compact and much richer auditing system.