Add mti actions - #567
Conversation
|
👋 A new build is available for this PR based on d8a7191. |
|
@ryan-moeller21 but why don't we do the same thing for the Index Advisor? Right now, just like with MTI, it only shows a table with the list, but there's no way to interact with them |
ryan-moeller21
left a comment
There was a problem hiding this comment.
Andrea, great work on this. Just a few small comments from me.
@ryan-moeller21 do you think we can also consider to do the same thing for index advisor? |
Oops, sorry for missing your initial comment about the Index Advisor! This seems like a great next step, too. |
|
Hi @ryan-moeller21,
You can check that job directly in vscode: Could you please check point 1 please? |
…x action, fix mti name
|
Hey @buzzia2001. Thanks for working on this feature. I haven't yet fully reviewed the code / tested the changes, but my initial thoughts on the UI (related to the email you had sent as well):
|
|
@sebjulliand Curious to hear ur thoughts on this |
|
Another option, we make move to use |
|
I think my suggestion to put it in the middle (aside from keeping the UI consistent with the other extensions) was also due to the potential amount of information I might find there... hypothetically, I could have thousands of lines, and having to scroll through them all down there is, from my perspective, a bit “meh”... Also, the table below doesn’t have a search function, which means that if I have an MTI on a specific table and it’s the last one in the list, I have to scroll all the way to the bottom, which is absolutely “meh,” especially when I might have thousands of rows… Although, as I told Sanjula, I think we should do it like in ACS: on one hand, a view for query results at the bottom is fine; on the other hand, there are other features we’d like to add to the extension, such as MTI, Index Advisor with actions, etc., which are also full-screen in ACS... However, if the plan is to try updating the results table component to include a search (or filters) in that case as well, I think it could work... @SanjulaGanepola imho we should put this pr on hold until we test new component and rebase afther that, what do u think? |
|
Hi @SanjulaGanepola @ryan-moeller21 @forstie I've pushed a new version following your requirements: My idea is to use this space in other prs for:
Any feedback for me? |
|
@SanjulaGanepola I also updated the colors to match those of the core:
There's a new config that you can use to highlight cells with NULL: |









Changes
This PR allows you to perform actions on MTIs. MTIs can be managed at the individual library or individual object level.
The supported actions are generating the SQL statement for the index or creating the index itself.
How to test this PR
From schema browser, choose MTI actions by right-clicking on a library or a file:

Clicking on “MTI Actions” will display the MTIs based on the search criteria:

By clicking on the suggested MTI, you can choose between SQL generation and index generation. Here is the output if you choose to generate SQL:

If, on the other hand, you want to create the index directly, you will first be prompted to enter the index name, and then a pop-up will appear asking you to confirm execution of the statement:

@forstie @ryan-moeller21 could you test it?
Checklist
console.logs I addedCloses #563