sql - What are the consequences/side effects of deleting STALE records from Oracle DB with Large Data? -


this may sound silly questions. however, 1 of easiest solutions keep data consistent delete stale records db table. table has millions of row.

can please tell me consequences/side-effects of deleting data db.

this db heavy read , medium writes.

any predictions or 2 cents here before learn hard way on production website? thereby unwanted side-effects caused inserts & deletes?

[update]

  1. one of plausible solutions have in mind is: have have options of adding column determine if data stale or not. however, solution, need keep track of variable.

  2. an event fired indicates single row in table stale. plan delete row when event fired.

so have hand-written chache? cache may expose 2 kinds of inconsistencies:

  • there rows in cache shouldn't there
  • there rows missing in cache should there

the latter not seem problem worry about.

deleting rows cache in order fix first issue not problem. however, how know when delete them. need keep track of whether cache dirty or not. doing whole table not easy. doing individual rows more difficult.

my experience such caches is: don't it unless absolutely have to. millions of rows not justify cache per se, still "small table".

the difficulties underestimated , performance benefits overestimated. find fixing bugs writing additional code, in end eats performance benefits.

more once i've been in situation threw away such cache, because had become unmanageable. , amazingly simpler code ended still fast enough.

if have to use cache opt materialzed view, invalidations tracked oracle. first make sure needed , don't fall premature optimizations.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -