Sql server r问题?不是一个答案,而是一个更简洁的问题:有没有办法优化数据工具模式比较过程?在我看来,在DB/模式比较中排除表几乎是毫无意义的,因为您要跟踪的大多数更改都与包含真实数据的实际表相关,而不是一些最终依赖于物理表的以太逻辑视图。所以,如果你不在泥泞的地形上

Sql server r问题?不是一个答案,而是一个更简洁的问题:有没有办法优化数据工具模式比较过程?在我看来,在DB/模式比较中排除表几乎是毫无意义的,因为您要跟踪的大多数更改都与包含真实数据的实际表相关,而不是一些最终依赖于物理表的以太逻辑视图。所以,如果你不在泥泞的地形上,sql-server,database,visual-studio-2017,comparison,Sql Server,Database,Visual Studio 2017,Comparison,r问题?不是一个答案,而是一个更简洁的问题:有没有办法优化数据工具模式比较过程?在我看来,在DB/模式比较中排除表几乎是毫无意义的,因为您要跟踪的大多数更改都与包含真实数据的实际表相关,而不是一些最终依赖于物理表的以太逻辑视图。所以,如果你不在泥泞的地形上测试山地车,禁用它就像证明山地车是“正常的”。我从来没有发现这是一个很好的工具。它充其量只能勉强运行,最坏的情况是,它自创建以来一直受到bug的困扰。它生成的更新脚本需要很长的时间来构建,并且有一半以上的时间失败。我使用这个工具来比较一个数据库


r问题?不是一个答案,而是一个更简洁的问题:有没有办法优化数据工具模式比较过程?在我看来,在DB/模式比较中排除表几乎是毫无意义的,因为您要跟踪的大多数更改都与包含真实数据的实际表相关,而不是一些最终依赖于物理表的以太逻辑视图。所以,如果你不在泥泞的地形上测试山地车,禁用它就像证明山地车是“正常的”。我从来没有发现这是一个很好的工具。它充其量只能勉强运行,最坏的情况是,它自创建以来一直受到bug的困扰。它生成的更新脚本需要很长的时间来构建,并且有一半以上的时间失败。我使用这个工具来比较一个数据库,但随后手动进行更改,因为这样会更快。
EXEC sp_create_plan_guide   
    @name = N'VS Schema Comp Spatial Idxs',  
    @stmt = N'SELECT * FROM (
SELECT 
        SCHEMA_NAME([o].[schema_id])    AS [SchemaName],
        [si].[object_id]                AS [ColumnSourceId],
        [o].[name]                      AS [ColumnSourceName],
        [o].[type]                      AS [ColumnSourceType],
        [ic].[column_id]                AS [ColumnId],
        [c].[name]                      AS [ColumnName],
        [si].[index_id]                 AS [IndexId],
        [si].[name]                     AS [IndexName],
        [ds].[type]                     AS [DataspaceType],
        [ds].[data_space_id]            AS [DataspaceId],
        [ds].[name]                     AS [DataspaceName],
        [si].[fill_factor]              AS [FillFactor],
        [si].[is_padded]                AS [IsPadded],
        [si].[is_disabled]              AS [IsDisabled],
        [si].[allow_page_locks]         AS [DoAllowPageLocks],
        [si].[allow_row_locks]          AS [DoAllowRowLocks],
        [sit].[cells_per_object]        AS [CellsPerObject],
        [sit].[bounding_box_xmin]       AS [XMin],
        [sit].[bounding_box_xmax]       AS [XMax],
        [sit].[bounding_box_ymin]       AS [YMin],
        [sit].[bounding_box_ymax]       AS [YMax],
        [sit].[level_1_grid]            AS [Level1Grid],
        [sit].[level_2_grid]            AS [Level2Grid],
        [sit].[level_3_grid]            AS [Level3Grid],
        [sit].[level_4_grid]            AS [Level4Grid],
        [sit].[tessellation_scheme]     AS [TessellationScheme],
        [s].[no_recompute]              AS [NoRecomputeStatistics],
        [p].[data_compression]          AS [DataCompressionId],
        CONVERT(bit, CASE WHEN [ti].[data_space_id] = [ds].[data_space_id] THEN 1 ELSE 0 END)
                                        AS [EqualsParentDataSpace]
FROM
        [sys].[spatial_indexes]          AS [si] WITH (NOLOCK)
        INNER JOIN [sys].[objects]       AS [o] WITH (NOLOCK) ON [si].[object_id] = [o].[object_id]
        INNER JOIN [sys].[spatial_index_tessellations] [sit] WITH (NOLOCK) ON [si].[object_id] = [sit].[object_id] AND [si].[index_id] = [sit].[index_id]
        INNER JOIN [sys].[data_spaces]   AS [ds] WITH (NOLOCK) ON [ds].[data_space_id] = [si].[data_space_id] 
        INNER JOIN [sys].[index_columns] AS [ic] WITH (NOLOCK) ON [si].[object_id] = [ic].[object_id] AND [si].[index_id] = [ic].[index_id]
        INNER JOIN [sys].[columns]       AS [c] WITH (NOLOCK) ON [si].[object_id] = [c].[object_id] AND [ic].[column_id] = [c].[column_id]
        INNER JOIN [sys].[objects]       AS [o2] WITH (NOLOCK) ON [o2].[parent_object_id] = [si].[object_id]
        INNER JOIN [sys].[stats]         AS [s] WITH (NOLOCK) ON [o2].[object_id] = [s].[object_id] AND [s].[name] = [si].[name]
        INNER JOIN [sys].[partitions]    AS [p] WITH (NOLOCK) ON [p].[object_id] = [o2].[object_id] AND [p].[partition_number] = 1
        LEFT  JOIN [sys].[indexes]       AS [ti] WITH (NOLOCK) ON [o].[object_id] = [ti].[object_id]
        LEFT JOIN [sys].[tables]         AS [t] WITH (NOLOCK) ON [t].[object_id] = [si].[object_id]
WHERE [si].[is_hypothetical] = 0
        AND [ti].[index_id] < 2
        AND OBJECTPROPERTY([o].[object_id], N''IsSystemTable'') = 0
        AND ([t].[is_filetable] = 0 OR [t].[is_filetable] IS NULL)
        AND ([o].[is_ms_shipped] = 0 AND NOT EXISTS (SELECT *
                                        FROM [sys].[extended_properties]
                                        WHERE     [major_id] = [o].[object_id]
                                              AND [minor_id] = 0
                                              AND [class] = 1
                                              AND [name] = N''microsoft_database_tools_support''
                                       ))
) AS [_results];
',  
    @type = N'SQL',  
    @module_or_batch = NULL,  
    @params = NULL,  
    @hints = N'OPTION (FORCE ORDER)';