Azuredatastudio: Peek Table Definition Feature Request - Keys, Indexes

Created on 23 Apr 2018  路  3Comments  路  Source: microsoft/azuredatastudio

  • SQL Operations Studio Version: 0.27.3

Steps to Reproduce: Use "Peek Definition" feature on a table

Request:

The table columns + types are nice, but without indexes, constraints (especially primary key) it is not entirely useful for more than simple work. Please add the option of scripting out indexes and constraints (at the very least primary key!).

As far as I can tell, there is no way to easily get this information for a table anywhere in the SQL Ops studio interface, I did not see any options for it, nor did I see it mentioned anywhere as a issue, bug, feature request, etc.

Thanks!

Area - Language Service Enhancement

Most helpful comment

Currently, the table peek definition is only really helpful for column list & data types.

I would argue that having the PK & other constraints are a critical part of the table definition.

As a user who spends significant time performance tuning, the column list is less interesting than the index list. I am generally much more interested in the PK, Clustered index, and non-clustered indexes for a table. Including indexes in the "Peek Definition" would be helpful.

If indexes can't/won't be included in the "Peek Definition" for tables, it would be useful to add "Peek Indexes" as a separate option... I'm happy to create a separate feature request, if y'all think that's useful.

All 3 comments

@jsmith8858 you should be able to see the complete table definition using the Script as Create command. Available from right-clicking on a table name in Object Explorer, for example.

The Peek Definition experience was intended for more ad-hoc exploration while coding T-SQL and sometimes the complete script with all the constraints, etc. can make the core table definition a bit harder to quickly digest. Though I agree having an option to script the entire definition even in the Peek\Go-to Definition scenarios makes sense.

Thanks! At the very least as mentioned showing the primary key is important. As someone who teaches a lot of SQL, one of the key things to know when selecting from and joining to any table is how the primary key is defining and constraining each table to understand how each join affects the overall result. Omitting primary key seems more like a bug to be honest as it's a core part of the table definition, while extra non clustered indexes certainly could reasonably be called a suggestion or feature request.

Currently, the table peek definition is only really helpful for column list & data types.

I would argue that having the PK & other constraints are a critical part of the table definition.

As a user who spends significant time performance tuning, the column list is less interesting than the index list. I am generally much more interested in the PK, Clustered index, and non-clustered indexes for a table. Including indexes in the "Peek Definition" would be helpful.

If indexes can't/won't be included in the "Peek Definition" for tables, it would be useful to add "Peek Indexes" as a separate option... I'm happy to create a separate feature request, if y'all think that's useful.

Was this page helpful?
0 / 5 - 0 ratings