|
PostgreSQL: Advanced SQL: Improving performance at the SQL level: Asynchronous notification
- Many applications issue expensive queries and get nearly the same results each time (Web log, reporting, etc)
- Solution: Client side cache
- Invalidate cache
- Client(s) issue: LISTEN cache;
- Large table has rule: CREATE RULE invcache AS ON [UPDATE | DELETE | INSERT ] TO largetbl DO NOTIFY cache;
- Clients get message, update cache with next query
Page 39
|