Spinning up a thread that polls a database too frequently will be consuming precious resources (such as memory heap-space, CPU cycle, database connection, etc) that could be used by the rest of the application and it could lower the performance of your application. However, if you don't poll your database often enough, you may see unwanted side-effects in your application. So, how can we achieve a high-performance applications that periodically polls a database to look for state changes?
If your application is using the Oracle Database, then this Creating High-Performance Database Applications with Java Triggers and the Oracle Database article is for you.
Thank you and happy reading .",)