3 ms·
You could cache or replicate the database for reads. When a post comes in, insert it into the master database, then sleep for a preset amount of time, then hav
by ulysses 18y ago
You could cache or replicate the database for reads. When a post comes in, insert it into the master database, then sleep for a preset amount of time, then have it start checking the local database copy to wait for it to show up, then run the query. Just use timestamp <= posters_timestamp to get the result set you want.
Adjust the sleep time based how frequent the cache updates are.