Which are better: Private vs Shared Database instances?
Using a single Database instance for multiple threads is supported and, as of JE 4.0, has no performance drawbacks. In JE 3.3 and earlier, using a single Database instance for multiple threads presented a minor bottleneck. The issue is that the Database object maintains a set of Cursors open against it. This set is used to check if all Cursors are closed against the Database when close() is called, but to do that JE has to synchronize against it before updating it. So if multiple threads are sharing the same Database handle it makes for a synchronization bottleneck. In a multi-threaded case, unless there’s a good reason to share a Database handle, it’s probably better to use separate handles for each thread.
Related Questions
- How secure is my online Contact Database? Does Campaigner ensure that my list of contacts will remain private and not be available to anyone else?
- What is the difference between a Virtual Private Server and a shared hosting environment?
- What is the difference between Dedicated (Private) hosting vs. Shared Hosting?