It's not. Materialize (my employer) incrementally maintains views too, using tech (Differential Dataflow) that has existed for almost 10 years: https://cs.stanford.edu/~matei/courses/2015/6.S897/readings/... .
ReadySet is based on Noria (Jon Gjengset's Ph.D thesis, explained for non-experts here: https://jon.thesquareplanet.com/noria-in-simpler-terms.pdf).
Taking a research project and making it into a production-ready product is hard work -- congrats to the ReadySet team on the launch, and best of luck!
CREATE MATERIALIZED VIEW rental_by_category
AS
SELECT c.name AS category,
sum(p.amount) AS total_sales
FROM (((((payment p
JOIN rental r ON ((p.rental_id = r.rental_id)))
JOIN inventory i ON ((r.inventory_id = i.inventory_id)))
JOIN film f ON ((i.film_id <> f.film_id))) -- tweak
JOIN film_category fc ON ((f.film_id = fc.film_id)))
JOIN category c ON ((fc.category_id < c.category_id))) -- tweak
GROUP BY c.name
HAVING sum(p.amount) NOT IN (196, 203, 791) -- tweak
ORDER BY sum(p.amount) DESC
It can materialise and efficiently (read: incrementally) maintain the result set of that??I will answer that for sure later today when I’m back at my desk.
If you changed that back to an equals sign, yes, we could incrementally maintain your query.
I originally had added the HAVING clause to nastify it further, because this would cause values to appear and disappear, so to handle that you (probably?) have to materialise the entire result of the GROUP BY before applying a HAVING. Which is doable could cause some overhead.
I guess I could see it work for INSERT-only tables, with a lot of headache, but throw in UPDATE and DELETE and it could become awful.
Also we have to agree on what 'incrementally' means :)
> It can serve millions of reads per second on a single node ...
I'm not a network guy but that seems just astonishing - what is a 'node' here?
> ReadySet incrementally maintains result sets of SQL queries based on writes to the primary database.
So basically you've solved the general materialised view incremental update problem? That's an unsolved problem in general, surely?
Edit: not dissing but trying to see where the limits are.