Azure SQL – Super fast string wildcard search with pagination

Cheat CodeIndex on column Today mission is to allow user to run super fast query on Azure SQL table.Not any kind of query, it’s a string search query… something like: The table is not too big, just 80 Millions rows (that’s freaking big actually).Why the query written that way is beyond this post (we needContinue reading “Azure SQL – Super fast string wildcard search with pagination”

Azure SQL – Where the heck is SQL Profiling?

Cheat Code (this is combo cheat, so pay attention!)> Azure SQL Audit + Blog Storage + XEL File + SSMS! I’m puzzled, cursing, banging my head, almost throw my laptop (lucky I didn’t do that, so bloody expensive if I did that – My company charge full laptop replacement to our paycheck if we brokeContinue reading “Azure SQL – Where the heck is SQL Profiling?”

SQL Server – Rename column via T-SQL

Cheat CodeEXEC sp_rename ‘[dbo].[TABLE_NAME].[OLD_COLUMN_NAME]’,’NEW_COLUMN_NAME’, ‘COLUMN’; I just received a set of tables in SQL Server which was loaded from CSV file without column header on 1st row. They provide separate EXCEL file which define the column name.You can imagine that all fields are like “[Column01]”, “[Column02]”, etc. Good luck to our Data Analyst writing “SELECTContinue reading “SQL Server – Rename column via T-SQL”

Finding SQL Server Object Dependency

Cheat CodeSELECT * FROM sys.sql_expression_dependencies This is continuation from previous blog post about my “special project” that requires us to find there the heck some object are depends on and who use them.Using the cheat code above is a fantastic breeze to find how things are wired.Give it a kick and you will find aContinue reading “Finding SQL Server Object Dependency”

Design a site like this with WordPress.com
Get started