fazalmajid / temboz

The Temboz RSS/Atom feed reader
MIT License
82 stars 4 forks source link

create mv_feed_stats on demand #93

Open fazalmajid opened 11 years ago

fazalmajid commented 11 years ago

The materialized view mv_feed_stats is updated in nightly maintenance, but on startup when it does not exist yet, v_feeds_snr is defined to calculate the long way by running a full table scan on fm_items. Rebuilding the materialized view is no slower, so we might as well do it on demand when a query calling v_feeds_snr is executed and mv_feeds_stats does not exist yet.