I have a specific PHP page that, for various reasons, should save ~ 200 fields in the database. These are 200 separate insert and / or update statements. Now the obvious thing is to reduce this number, but, as I said, for reasons that I will not go into, I can not do this.
I did not expect this problem. The selections seem quite effective in MySQL, but there are no inserts / updates (this update takes about 15-20 seconds, which is naturally unacceptable). I wrote Java / Oracle systems that can happily make thousands of attachments / updates at the same time (in both cases, local databases, MySQL 5 and OracleXE work).
Now in something like Java or .Net, I could easily do one of the following:
- Writing data to the memory cache entry (i.e., he will know how to save the database and can do this asynchronously);
- Write data to the memory cache and use PaaS (Persistence as a Service), i.e. the listener cache will save the fields; or
- Just start the background process which can be saved.
The minimum solution is to have a cache that I can just update, which will separately start and update the database in due time (that is, it will be returned immediately after updating the cache in memory). This can be either a global cache or a session cache (although the global shared cache is handled differently).
Any other solutions to this problem?
source
share