Coder Social home page Coder Social logo

madeiradata / madeiratoolbox Goto Github PK

View Code? Open in Web Editor NEW
179.0 23.0 92.0 36.67 MB

Open-source Repository of Useful Scripts and Solutions for Microsoft Data Platform Administrators

Home Page: https://www.madeiradata.com

License: MIT License

TSQL 85.74% C# 0.23% CSS 0.10% XSLT 1.07% PowerShell 6.58% Vim Snippet 1.23% PLpgSQL 3.81% Python 0.59% Jupyter Notebook 0.65%
mssql sqlserver sql-server tsql t-sql scripts ms-sql-server microsoft-sql-server azure

madeiratoolbox's Introduction

This Repository is DEPRECATED

This was the official Toolbox repository for Madeira's consultant team, for "as-is" solutions and tools/scripts that the team publishes.

Since March 2024, this repository has been CLOSED to further changes, in favor of SPLITTING it into 3 new repositories separated by fields of specialization:

Please subscribe to those new repositories instead โ™ฅ.

Welcome - We are Madeira Data Solutions

Please visit our official website at:

www.madeiradata.com

For more community resources, visit our official community web pages:

License

All Madeira Toolbox materials in this repository are released under the MIT license.

madeiratoolbox's People

Contributors

benhazan05 avatar chandrasaikarthik avatar chenhirsh avatar eitanblumin avatar ericmadeira avatar gerireshef avatar guy-yaakobovitch avatar guyglantser avatar lardoag avatar mariasql avatar ritafmadeira avatar sagiamichai avatar sqladrian avatar talpreisler avatar tovli avatar vitalybruk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

madeiratoolbox's Issues

Add missing checks to the Condensed BP Check script

Add support for COLUMNSTORE and COLUMNSTORE_ARCHIVE compression type checks

CROSS JOIN (VALUES('PAGE'),('ROW')) AS ct(CompressionType) -- check both ROW and PAGE compression for each

INNER JOIN sys.partitions AS p WITH(NOLOCK) ON t.object_id = p.object_id AND p.data_compression = 0

Limitations and Restrictions

Prior to SQL Server 2019, this procedure did not apply to columnstore indexes, and therefore did not accept the data compression parameters COLUMNSTORE and COLUMNSTORE_ARCHIVE. Starting with SQL Server 2019, columnstore indexes can be used both as a source object for estimation, and as a requested compression type.

IMPORTANT
When Memory-Optimized TempDB Metadata is enabled in sql-server-2019, creation of columnstore indexes on temporary tables is not supported. Because of this limitation, sp_estimate_data_compression_savings is not supported with the COLUMNSTORE and COLUMNSTORE_ARCHIVE data compression parameters when Memory-Optimized TempDB Metadata is enabled.

Considerations for Columnstore Indexes

Starting with sql-server-2019, sp_estimate_compression_savings supports estimating both columnstore and columnstore archive compression. Unlike page and row compression, applying columnstore compression to an object requires creating a new columnstore index. For this reason, when using the COLUMNSTORE and COLUMNSTORE_ARCHIVE options of this procedure, the type of the source object provided to the procedure determines the type of columnstore index used for the compressed size estimate. The following table illustrates the reference objects used to estimate compression savings for each source object type when the @data_compression parameter is set to either COLUMNSTORE or COLUMNSTORE_ARCHIVE.

Source Object Reference Object
Heap Clustered columnstore index
Clustered index Clustered columnstore index
Nonclustered index Nonclustered columnstore index (including the key columns and any included columns of the provided nonclustered index, as well as the partition column of the table, if any)
Nonclustered columnstore index Nonclustered columnstore index (including the same columns as the provided nonclustered columnstore index)
Clustered columnstore index Clustered columnstore index

NOTE
When estimating columnstore compression from a rowstore source object (clustered index, nonclustered index or heap), if there are any columns in the source object that have a data type that is not supported in a columnstore index, sp_estimate_compression_savings will fail with an error.

Similarly, when the @data_compression parameter is set to NONE, ROW, or PAGE and the source object is a columnstore index, the following table outlines the reference objects used.

Source Object Reference Object
Clustered columnstore index Heap
Nonclustered columnstore index Nonclustered index (including the columns contained in the nonclustered columnstore index as key columns, and the partition column of the table, if any, as an included column)

NOTE
When estimating rowstore compression (NONE, ROW or PAGE) from a columnstore source object, be sure that the source index does not contain more than 32 columns as this is the limit supported in a rowstore (nonclustered) index.

Resources:

Add Where Clause to Find overlapped statistics + DROP statement.sql

Great script but it recommends removing statistics that are not completely overlapping. If the "overlapped" statistic is a filtered index then the script will recommend removing the auto generated statistic but the statistic will then be auto-recreated again.
Adding " AND S.has_filter = 0" to the last where clause fixes this in a "sledgehammer" way.

MaxDOP_Configuration_Check.sql gives me an incorrect result

Hi
I try some run on different server and found that the result isn't correct.

I got:
@@ServerName: MSSQL01
@EffectiveMaxDOP: 2 (YES TRUE)
@NumaNodeCount: 1 (NO I GOT 2 NUMA... see the image)

SELECT * FROM sys.dm_os_nodes
image

but from SSMS I got a single one?
image

Which is the correct?
I see you count distinct on this...
image

And also from server log:

  • SQL Server detected 4 sockets with 4 cores per socket and 4 logical processors per socket, 16 total logical processors; using 16 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
  • Automatic soft-NUMA was enabled because SQL Server has detected hardware NUMA nodes with greater than 8 physical cores.

@LogicalProcessorPerNumaNodeCount: 16 (NO ARE 8... see the above)

MaxDOP is already within recommended range: 8 (NO IT's 2)

I'm little confused,
Thanks Alen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.