Skip to content

Instantly share code, notes, and snippets.

@BirgittaHauser
BirgittaHauser / SearchSrcMbr
Created November 5, 2020 15:44
How to search source physical file member for a specific String
It was just a question in a Forum: How to search (all) source physical file members for a specific string and list all those members
In this examples all source files beginning with "QSRC" in the "YOURSCHEMA" library are searched whether they include "String".
All Source Members that include "String" are returned
With a as (Select a.System_Table_Schema OrigSchema,
a.System_Table_Name OrigTable,
a.System_Table_Member OrigMember,
Trim(System_Table_Schema) concat '/' concat
Trim(System_Table_Name) concat '(' concat
Trim(System_Table_Member) concat ')' as OrigCLOBMbr
@forstie
forstie / Largest MTIs in use today.sql
Created October 27, 2020 17:59
Maintained Temporary Indexes (MTIs)... everyone has them, but they're similar to building a house on sand... your foundation for performance is not rock solid. Use this Gist to gain some insight into this topic!
--
-- Gist: Largest MTIs in use today
--
-- Use SQL to understand where Maintained Temporary Indexes (MTIs) are being used, and more...
--
--
--
-- Find the tables with the 10 largest MTIs
--