A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
This approach will give you some information - but not all. Consider for instance:
CREATE TABLE tbl (str varchar(128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL PRIMARY KEY)
INSERT tbl (str)
SELECT name FROM sys.objects
go
SELECT * FROM tbl WHERE str = N'objects'
go
DROP TABLE tbl
Here you will get an implicit conversion from varchar to nvarchar, and because the collation is an SQL collation, this means that an seek of the index is not possible and you get a scan instead. But there is no warning for this in the plan. However, that may be because the table is small. When I change the way I fill the query to
INSERT tbl (str)
SELECT convert(varchar(36), newid())
FROM generate_series(1, 1000000)
I do get a warning.
Overall, I have not studied this warning for implicit conversion very carefully, but I know that I have been looking at plans with this warning and thinking "eh, what ghosts is it seeing?`"
When it comes to missing indexes, note that this is not an omnipresent all-knowing feature, but it main make suggestions for indexes covering the query. Sometimes these recommendations certainly makes sense, but followed slavically, you will end up with a number of redundant and overlapping indexes - and you may still need indexes that could help to speed up your performance. As an example, consider these two queries:
SELECT a, b, c FROM tbl WHERE indexedcol = @value
SELECT a, b, f FROM tbl WHERE indexedcol = @value
The missing-indexes feature will suggest two indexes: (indexedcol) INCLUDE(a, b, c) and indexedcol INCLUDE(a, b, f). A better approach might to have one index (indexedcol) INCLUDE (a, b, c, f). Or simply have an index on indexcol alone and accept the key lookups. One problem is that next week there is a new requirement, so that column g should be returned, and in that case the index with all INCLUDE-columns is no longer covering, only bloated.
Despite these disclaimers, I would say that your approach is not an unreasonable one. If you can automate this and parse the XML you get out of it, you can make some findings, but you need to manual post-processing and evaluate what you should implement and what you should ignore.
I have not made any closer investigation, but quick testing does not reveal any difference in what information that is returned in these regards.
And as for better ways to find this information - no, there is nothing equally directly accessible you can use.