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

ALTER DOMAIN DROP CONSTRAINT and ADD CHECK too slow [CORE5453] #5724

Open
firebird-automations opened this issue Jan 15, 2017 · 3 comments
Open

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Maxim Kuzmin (cybermax)

Our database has a domain DOM$DATE. It is used in 300 tables and 500 stored procedure. Executing and commit of each of these query's take's about 1 minute:
ALTER DOMAIN DOM$DATE
DROP CONSTRAINT;

ALTER DOMAIN DOM$DATE
ADD CHECK (VALUE BETWEEN DATE '01.01.1900' AND DATE '31.12.2100');

P.S. Vlad Khorsun's said it was due to the restructuring of dependencies, but in this case it is not necessary.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

In this happen in 3.0 too?

Why would drop check constrant would "restructuring dependencies"?

@firebird-automations
Copy link
Collaborator Author

Commented by: Maxim Kuzmin (cybermax)

Adriano, in 3.0.1 the same.

I do not know the cause of a long drop and add check. I wrote only what Vlad said.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Adriano,

almost any change of any metadata object drop's all dependencies and re-creates it again (using new definition).
It means DELETE and INSERTS into RDB$DEPENDENCIES. In this case (and in many others) - absolutely the same records
is deleted and inserted again.
Just look at stats of corresponding COMMIT statement execution.

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