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

INCLUDE index columns are being generated as covering index columns #12

Open
Rap70r opened this issue May 27, 2020 · 2 comments
Open

INCLUDE index columns are being generated as covering index columns #12

Rap70r opened this issue May 27, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Rap70r
Copy link

Rap70r commented May 27, 2020

Hello,

If the origin table has an index with INCLUDE columns, the output script has those columns as covering columns.

Origin

CREATE INDEX idx1 ON MyTable (Col1) INCLUDE (Col2, Col3)
Output
CREATE INDEX idx1 ON MyTable (Col1, Col2, Col3)

@Rap70r Rap70r changed the title INCLUDE columns are being generated as clustered index INCLUDE index columns are being generated as covering index columns May 27, 2020
@Rap70r Rap70r closed this as completed May 27, 2020
@Rap70r Rap70r reopened this May 27, 2020
@Rap70r
Copy link
Author

Rap70r commented May 27, 2020

I used sc.is_included_column column and split the index creation section into 2. First create the index with sc.is_included_column = 0 and second create the INCLUDE section with sc.is_included_column = 1.

@EitanBlumin EitanBlumin self-assigned this May 27, 2020
@EitanBlumin EitanBlumin added the bug Something isn't working label May 27, 2020
@EitanBlumin
Copy link
Owner

Thank you!
Could you please fork the repository and create a pull request with this fix?

I'll review it and approve its merge into the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants