Skip to content
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

If record with BLOBs is inserted into temporary table, create copy of BLOB content in temporary space [CORE4157] #4484

Closed
firebird-automations opened this issue Aug 3, 2013 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @aafemt

Consider this code in after insert or update trigger on permanent table:
BEGIN
INSERT INTO temp_table (blob_field) VALUES (new.blob_filed);
END
Currently copy of BLOB's content is created in permanent storage, decreasing effectiveness of the operation and blowing DB file. Besides, on commit or disconnect this new copy of the BLOB is cleaned out, slowing down the process even more.
With BLOB content in the same temp space as the temp table, there is no need to run ordinary garbage collection process with records analysing and BLOBs erasing, it is enough to drop whole temp file.

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

Vlad said that it already works this way.

@firebird-automations
Copy link
Collaborator Author

Modified by: @aafemt

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Development: Finished

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

> Currently copy of BLOB's content is created in permanent storage
This is wrong and never was true.

When blob is copied and destination is relation filed the destination page space is already known therefore engine assigns correct page space to the new blob.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant