Hello,
I have a situation where I want a table (or MV) to be available for rapid querying in real time, but this table is always being updated.
What I want to display is the latest (most-recent) record for a given set of keys including a date-field. (not necessarily the most recently inserted, but the most recent based on a date field)
One catch - the latest record cannot be the latest if it's parent record is already marked as 'deleted'. Likewise, if the parent gets deleted, the MV needs to update set the latest record correctly by removing the latest and inserting whatever is now the latest.
Parent table: 1421 rows
Child Table: 105 million rows
As new records come in with later dates, they can now be the 'latest' record, but then the MV would have to remove the existing record it had that was the 'latest' previously before inserting the new one.
Can this be done in a very low latency way? The 'keys' for each unique record make up 5 to 50 rows, so that many records would need to be considered each time there is an insert or update to the child table.
Thank you very much for your assistance!
Start Free Trial