What is the most efficient/recommended date/time format to use for indexing and querying? I am aware that you can use the date functions to convert epoch time to ISO dates in N1QL queries, but what is the most efficient/ideal format?
Based on what you want to do, what operations you are doing. For example: ISO-8601 can include TZ also and it is string comparable. You can aggregation by year or year-month, year-mothn-day, … just using SUBSTR() or date functions.
epoch time also converted to ISO-8601 If you are doing every document in query it might be overhead.
Which one might be overhead? Storing as epoch time and converting each document’s time value to ISO-8601 during queries using MILLIS_TO_STR?
epoch time 8 bytes vs ISO-8601 29 bytes,
conversion vs Disk i/0, network transfer
no-timezone vs timezone