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

create index idx [as active | inactive] on ... [CORE5981] #6233

Open
firebird-automations opened this issue Jan 10, 2019 · 0 comments
Open

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Volker Rehn (vr2_s18)

Syncing metadata of two databases: If the master db has inactive indices which are missing in the target, on creation they will be activated in the target db, do a full data scan, and only afterwards they can then be deactivated by alter index. An optional "as active/inactive" clause would give more control over when an index is actually built. Oracle and MySQL have visible/invisible for indices, but that only removes the index from being used by the optimizer, it still performs a data scan on creation. Apparently the SQL standard does not regulate index creation. The syntax could be

CREATE [UNIQUE] [ASC[ENDING] | DESC[ENDING]]
INDEX indexname [AS ACTIVE | INACTIVE] ON tablename
{(col [, col ...]) | COMPUTED BY (<expression>)};

ACTIVE being the default as it is now. Similar to how triggers are defined.

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