Skip to content

Instantly share code, notes, and snippets.

View jpomfret's full-sized avatar

Jess Pomfret jpomfret

View GitHub Profile
@jpomfret
jpomfret / sp_indexinfo.sql
Created February 4, 2025 11:24
sp_indexinfo
-- Index stats are from the last restart - this will show you the days
select datediff(d,create_date,getdate())
from sys.databases
where name = 'tempdb'
/*
You can either run this with specific schema or table names or you can run it with % in those variables to get all indexes for a schema or for the whole database
@schPat SYSNAME = '%'
,@tblPat SYSNAME = '%'
@jpomfret
jpomfret / kubernetes_clearUpEvictedPods.ps1
Last active February 18, 2026 20:16
Kubernetes: Clear up evicted pods
# quicker method
# get
kubectl delete pod --all-namespaces --field-selector=status.phase=Failed
# and delete
kubectl delete pod --all-namespaces --field-selector=status.phase=Failed