-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[oracle] zodbconvert incredibly slow. Here is a fix. #450
Comments
I think one could add the index right after this line if I am right: relstorage/src/relstorage/adapters/schema.py Line 482 in 9e7a638
|
Oracle is not tested or supported. I will not be adding an index that only benefits oracle. Now, that could all change if there was some way to test oracle on ci. Given that there’s not, I am more likely to just remove the code. |
More generally, as every DBA knows, indices are a trade off in several dimensions, chiefly of interest here is online performance versus batch performance. Since RelStorage is focused on online performance, and converting with zodbconvert is extremely rare, relatively speaking, the bar is very high to add features that only benefit such a rare use. |
There is also a guy who saw a similar culprit with Postgres. I did not test it but I wonder if it is the same reason but for |
The version of RelStorage being used there was extremely old. My group just converted a bunch of large-ish databases to Postgres using the current version of RelStorage and it actually went much faster than expected. |
Thanks for your answer. May I ask you one more thing? |
3.0a13 was probably the last time I tested it specifically. Oracle has never been regularly tested to my knowledge. |
Okay. And that all depends on the lack of an oracle database server where tests could be ran against? |
I'm that guy ;-) But I'm not convinced by that "... only benefits oracle." argument. |
@NicolasGoeddel I've been using Relstorage 3.4.0 and Oracle in the wild for months with no particular problems. |
Hi there,
for reference you can find the whole issue here: https://community.plone.org/t/zodbconvert-incredibly-slow-solved/13606
While converting a filestorage/blobstorage to a relstorage using the oracle backend it takes a lot if time even if the database is very small.
I found the culprit in this SQL statement:
It joins with the view
current_object_state
which in turn joins the two tablescurrent_object
andobject_state
using the columnsZOID
and `TID':The table
object_state
already has an unique index over (ZOID
,TID
) butcurrent_object
has not. So I created the index by myself:After that the
SELECT
statement I mentioned above only needs 50 ms instead of 35 s to evaluate. And also thezodbconvert
script got 36 times faster than before. I was able to convert the data with 1.14 transactions per second:And before it was more like 0.03 transactions per second.
Please add that index to the code base so everyone can feel the difference.
Version:
The text was updated successfully, but these errors were encountered: