.net - Store rarely changed data but frequently accessed, which is solution? -
my oracle database contains simple, rarely-changed data (it takes months or years change). it's accessed (hundred times/day). think continuously access in database expensive.
edit: i'm thinking alternative way store data, not in database, example, store in app's cache, i'm confused data consistency. how can efficiently?
edit: original question quite general. want explain clearer:
i have table contains:
minvalue maxvalue packageid 1 4 1 5 10 2 11 50 3
when client send request our service, send amount, our service has determine package request belong to. depends on amount, , may changed due business needs (as mentioned before, it's changed).
i use query this:
select packageid vmeet_temp amount between minvalue , maxvalue
yes, work. since i'm inexperienced programmer, doubt if there's more efficient way archive this.
so question is: our need, should store information in database, or not? if not, solution go?
store in table, , let dbms worry it. has caching , @ making sure used data stored in memory not need go disk it. if want to, can load data application - run (small) risk data stale. generally, let dbms worry , right you.
if table 10 rows, , rows modest in size (up few hundred bytes each), dbms not bother using index if create 1 - knows simpler , more efficient use table directly. simple-minded optimizers manage that. obviously, if bludgeon using index misplaced hints, pay performance penalty. if left own devices, unlikely optimizer use index.
Comments
Post a Comment