I have a c# solution which uses mssql database to store data.
In my database there is a big table of entities (e.g. accounts) for each of which the TimezoneId field is defined. This field is filled during the registration of a new account using the MaxMind GeoIP2 library.
+----+-------------+------------+
| Id | AccountName | TimeZoneId |
+----+-------------+------------+
| 1 | account1 | 1 |
| 2 | account2 | 1 |
| 3 | account3 | 2 |
| 4 | account4 | 3 |
| 5 | account5 | 1 |
+----+-------------+------------+
TimeZoneId as a foreign key for table TimeZones, which stores the names of time zones in the IANA time zone format (e.g., America/New_York).
+----+----------------------+
| Id | Name |
+----+----------------------+
| 1 | Europe/Paris |
| 2 | Africa/Kampala |
| 3 | Africa/Dar_es_Salaam |
| 4 | Asia/Karachi |
+----+----------------------+
Now I need to be able to select all the accounts from the database, the time zone for which match with utc offset specified by the user. For example, if the user specifies the offset "UTC+2" i want to select accounts with timezones "Europe/Oslo", "Europe/Paris", "Europe/Rome" and other that have this offset. Which solution in terms of performance is best suited for this task?
Expand the TimeZones table with utc-offset field, create a memory cache with data about time zones and offsets or something else? I would appreciate advice.