Skip to content

Instantly share code, notes, and snippets.

View rogatec's full-sized avatar
🔋

TeaMohn rogatec

🔋
  • Germany
  • 13:13 (UTC +02:00)
  • X @t_ec
View GitHub Profile
@EliFuzz
EliFuzz / Hexagonal Architecture.svg
Created October 8, 2023 17:59
Hexagonal Architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dhmacher
dhmacher / Widest tables by avg row bytes.sql
Created June 29, 2021 14:14
Show the widest tables (or indexed views) by average bytes/row
/*
Find the widest tables by bytes/row
*/
SELECT OBJECT_SCHEMA_NAME(ps.[object_id])+N'.'+OBJECT_NAME(ps.[object_id]) AS [Object],
ix.[name] AS [Index],
ps.partition_number AS [Partition],
p.data_compression_desc AS [Compression],
REPLACE(CONVERT(varchar(20), CAST(SUM(ps.row_count) AS money), 1), '.00', '') AS [Row count],
REPLACE(CONVERT(varchar(20), FLOOR(CAST(SUM(8192.*ps.in_row_used_page_count) /NULLIF(SUM(ps.row_count), 0) AS money)), 1), '.00', '') AS [In-row, bytes/row],