I have a table in PostgreSQL, on this table I have implemented a pg_notify , so for every row which inserts in this table generates a notification (new row ID), on my .NET Blazor Server application I receive this notification.
Problem is that this table is getting values inserted after every 500 milliseconds, but the thing is only the last row is useful for me. Means the last row has the updated data aswell.
What could be done to improve the design?. Also what could be the best solution to handle this high frequency of notifications at Application level?
My Current Solution is :
I receive notification (id) then gets the data against that ID from the database and do my work.