Skip to content

Do not remove indexes not declared in code #192

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

Closed
ondrejtucny opened this issue Nov 16, 2021 · 18 comments
Closed

Do not remove indexes not declared in code #192

ondrejtucny opened this issue Nov 16, 2021 · 18 comments

Comments

@ondrejtucny
Copy link

When there are extra indexes declared for a table, do not delete them. At least introduce an option, which will tolerate unknown indexes. This is important when manual performance tuning is done by the DBA in large-scale installations.

@alex-kulakov
Copy link
Contributor

DataObjects.Net has a way to ignore tables and columns, probably we could expand this to support indexes as well (ignoring by prefix of name or exact name).

@LookBehind
Copy link
Contributor

@alex-kulakov we also need this feature, both for columns and indexes.
should "existing column ignoring" done by upgrade handlers ?

@alex-kulakov
Copy link
Contributor

@LookBehind , No. Take a look at DomainConfiguration.IgnoreRules, now these rules filter tables/table columns on very low level. So the idea is to expand this feature to support indexes. If you are familiar with DO sources you can take a look at Xtensive.Orm.Tests.Storage.IgnoreRulesValidateTest for examples of how these rules might be configured.

@alex-kulakov
Copy link
Contributor

alex-kulakov commented Nov 29, 2021

By the way, @LookBehind , you probably need this feature in master but feature requester expects it to be in 6.0 as I understand it.

@LookBehind
Copy link
Contributor

thanks for the link.
master is version 7?

@alex-kulakov
Copy link
Contributor

@LookBehind , master is going to be 7.1, the version is in Version.props file in repository root.

@ondrejtucny
Copy link
Author

@alex-kulakov we can't upgrade any dependencies this year, so the earliest I can is January 2022, in which case we will have time to test and hence should be able to upgrade to the latest 7.x.

@alex-kulakov
Copy link
Contributor

@ondrejtucny yep, as I said 6.0 is highly desirable, I understood that from another issue about index performance

@ondrejtucny
Copy link
Author

@alex-kulakov what I mean is that I can live with version 7 :) No need to back-port to 6.x.

@alex-kulakov
Copy link
Contributor

So we're free to implement it in 7.1 (current master), right?

@LookBehind
Copy link
Contributor

LookBehind commented Nov 29, 2021

a quick question: if the column is ignored by your pointed way - will the index that was put on that column be removed by DO during upgrade or not?

@alex-kulakov
Copy link
Contributor

a quick question: if the column is ignored by your pointed way - will the index that was put on that column be removed by DO during upgrade or not?

If you look at the IgnoreRulesHandler class, you can see that it removes some indexes on table if an ignored column is part of this index, also foreign keys can be removed.

@ondrejtucny
Copy link
Author

Is this going to make it to 7.1? Btw. what's the expected timeline for 7.1 and .NET 6 support?

@alex-kulakov
Copy link
Contributor

alex-kulakov commented Aug 26, 2022

I'll try to make it happen before 7.1 become ready-to-release.

Speaking of Net6 support, it is already in master, dotnet build -c Release will provide you packages with binaries for both frameworks.

We're accumulating certain improvements to make DO faster, these include some API changes which, to my mind, should happen before final release, I assume we will have at least one Beta because changes are significant and we want to give it time and wait for some problems appear. We will probably publish next Beta in September/October

@ondrejtucny
Copy link
Author

Thanks. @alex-kulakov I will drop you an email with a few questions, not really being an issue hence not spoiling issues with questions here.

@alex-kulakov
Copy link
Contributor

@ondrejtucny , I'm going to close the issue. Index ignore rules are in master for a while, have you tried it?

@ondrejtucny
Copy link
Author

@alex-kulakov, not yet, thanks for notifying me. When do you expect the official 7.1.0 to ship? I can update our private repo with the latest 7.1.0 Beta 2. We are planning a major release for 04/2023, so it's a good opportunity for a minor upgrade of DO as well.

@alex-kulakov
Copy link
Contributor

We have one thing to merge before going out of pre-release state - DateOnly and TimeOnly support. It is serious changes so I don't want them to be done in release. So, ideally, there will be at least one RC. Then if no issues appeared we'll be able to make a release. We have some interests within our company to get release till the end of February.

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

No branches or pull requests

3 participants