Skip to content

Do not remove indexes not declared in code #192

Closed

Description

@ondrejtucny

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.

Activity

  1. alex-kulakov commented on Nov 17, 2021

    @alex-kulakov
    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).

  2. LookBehind commented on Nov 29, 2021

    @LookBehind
    Contributor

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

  3. alex-kulakov commented on Nov 29, 2021

    @alex-kulakov
    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.

  4. alex-kulakov commented on Nov 29, 2021

    @alex-kulakov
    Contributor

    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.

  5. LookBehind commented on Nov 29, 2021

    @LookBehind
    Contributor

    thanks for the link.
    master is version 7?

  6. alex-kulakov commented on Nov 29, 2021

    @alex-kulakov
    Contributor

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

  7. ondrejtucny commented on Nov 29, 2021

    @ondrejtucny
    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.

  8. alex-kulakov commented on Nov 29, 2021

    @alex-kulakov
    Contributor

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

  9. ondrejtucny commented on Nov 29, 2021

    @ondrejtucny
    Author

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

  10. alex-kulakov commented on Nov 29, 2021

    @alex-kulakov
    Contributor

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

  11. LookBehind commented on Nov 29, 2021

    @LookBehind
    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?

  12. alex-kulakov commented on Nov 29, 2021

    @alex-kulakov
    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.

  13. ondrejtucny commented on Aug 25, 2022

    @ondrejtucny
    Author

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

  14. alex-kulakov commented on Aug 26, 2022

    @alex-kulakov
    Contributor

    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

  15. ondrejtucny commented on Aug 26, 2022

    @ondrejtucny
    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.

  16. alex-kulakov commented on Jan 11, 2023

    @alex-kulakov
    Contributor

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

  17. ondrejtucny commented on Jan 11, 2023

    @ondrejtucny
    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.

  18. alex-kulakov commented on Jan 16, 2023

    @alex-kulakov
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions