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

rdb$ref_constraints non index read [CORE3729] #4075

Open
firebird-automations opened this issue Jan 13, 2012 · 11 comments
Open

rdb$ref_constraints non index read [CORE3729] #4075

firebird-automations opened this issue Jan 13, 2012 · 11 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Attila Molnár (e_pluribus_unum)

Dropping primary od unique key cause non index reads on rdb$ref_constraints. DDL commans should always use indices.

@firebird-automations
Copy link
Collaborator Author

Modified by: Attila Molnár (e_pluribus_unum)

summary: rdb$ref_constraint non index read => rdb$ref_constraints non index read

@firebird-automations
Copy link
Collaborator Author

Modified by: Attila Molnár (e_pluribus_unum)

Component: Engine [ 10000 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

Why? DDL is not a time-critical operations.

@firebird-automations
Copy link
Collaborator Author

Commented by: Attila Molnár (e_pluribus_unum)

Everything is time critical! We are planning to run hunderds of small databases, and database upgrade have to be fast (SaaS with very high availability).

It's impossible to put an index to a rdb$ref_constraints?

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

It is most likely pointless. You can test it yourself: create desired index and compare speed of operations before and after that.

@firebird-automations
Copy link
Collaborator Author

Commented by: Attila Molnár (e_pluribus_unum)

Currently it has only 1 index on field RDB$CONSTRAINT_NAME.
Putting an index to RDB$CONST_NAME_UQ does not help. The problem is deeper in the engine.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Have you reconnected (disconnected everybody in the case of SS) before testing with a newly created index?

@firebird-automations
Copy link
Collaborator Author

Commented by: Attila Molnár (e_pluribus_unum)

Putting an index to RDB$CONST_NAME_UQ, and reconnecting works fine.
Please put a system index to it.

Thank you.

@firebird-automations
Copy link
Collaborator Author

Commented by: @reevespaul

Have you done any benchmarking on this?

Unless you have a very large table using a index will more than likely be slower than a direct table scan.

@firebird-automations
Copy link
Collaborator Author

Commented by: Attila Molnár (e_pluribus_unum)

In the near future (end of the year) the record count of rdb$ref_constraints estimated over 1000. (in far future up to 5000 is possible)
Readind 1 record directly through index is faster than x K record natural scan.

@EPluribusUnum
Copy link

This is still an issue (Tested with FB30 and FB40)

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

2 participants