Wouldn't it be a lot more efficient to just work that way in the first place?
[1] http://livesql.org/ <--- just a few paragraphs of text from 2011
Wouldn't it be a lot more efficient to just work that way in the first place?
[1] http://livesql.org/ <--- just a few paragraphs of text from 2011
https://docs.oracle.com/en/database/oracle/oracle-database/2...
You can get callbacks from the driver as query results change, or have notifications be sent to stored procedures, or posted to a message queue (and from there turned into web hooks etc). The notification comes with info about the deltas.
The main issue with it is that the queries it can monitor live are a subset of all queries. It's really more like using SQL to select database cells to watch, than propagating changes through arbitrary query plans. For example, it can't handle a SELECT COUNT(*) FROM statement. Obviously you can use it as a trigger for re-running more advanced queries though.
SQL server has Query Notification.
You can also read from debezium or other cdc, but thats more like table change than query result change.
And many databases have triggers. And with postgres you can combine triggers with NOTIFY to push changes downstream.
But yeah, I feel like most databases are way behind Oracle on this feature and it's so so useful.