Oracle: cache the server version when first needed
|Reported by:||akaariai||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
As discussed in this django-developers thread, it would be good from performance standpoint to cache the version information when first needed, and then use that information for every connection taken from that DB. The caching is per database alias.
There is also some cleanups included in the patch. The main thing is that I added supports_regex DatabaseFeature, which is false for Oracle v9.
The attached patch does pass lookup tests. It is about 20% faster on taking 1000 connections and immediately closing them.
I do get one test failure in basic tests, but I do get the same failure in test_unicode_data on master, too. Probably something wrong with my setup. I am running the full test suite currently, but I can't report about results until Monday when I am next at work.
Unfortunately I can't test this on Oracle v9.
Change History (7)
Changed 3 years ago by akaariai
comment:1 Changed 3 years ago by lukeplant
- Needs documentation unset
- Needs tests unset
- Patch needs improvement set
- Triage Stage changed from Unreviewed to Accepted